Skip to content

Commit 5df1196

Browse files
authored
Updated "verbose linting" test to allow for backtrace changes in Ruby 3.4 (#1731)
- file: spec/acceptance/lint_spec.rb:188 Ruby 3.4 backtrace locations now include the object name as well as the method name. So "...`save!`" in 3.3, becomes "...'InvalidThing#save!'" in 3.4 The solution was to update the test regex to allow for either option: %r{#{__FILE__}:\d*:in ('InvalidThing#save!'|`save!')}
1 parent a2df3a3 commit 5df1196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/acceptance/lint_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def save!
211211
FactoryBot.lint(verbose: true)
212212
}.to raise_error(
213213
FactoryBot::InvalidFactoryError,
214-
%r{#{__FILE__}:\d*:in `save!'}
214+
%r{#{__FILE__}:\d*:in ('InvalidThing#save!'|`save!')}
215215
)
216216
end
217217
end

0 commit comments

Comments
 (0)