rails/rails-dom-testing

assert_select mutates the first string argument

obfuscoder opened this issue · 4 comments

Using the new header # frozen_string_literal: true defines all strings as frozen. This is the recommended way in order to be ready for the transition to Ruby 3 where all strings will be immutable by default.

With that I got exceptions running code like this in my tests:

assert_select +'a[href=?]', some_path

It seems, assert_select mutates the first argument instead of dup'ing it first.

There is no answer on this issue yet. Is this the right place or is this module maintained somewhere else now?

Right place. Do submit a PR 😊

#70 resolved this issue, right?

It is. Thanks for checking!