Skip to content

Commit 2aac389

Browse files
authored
Merge pull request #1999 from rspec/truncate-method-name
Truncate method names in system tests
2 parents 15fb5bb + 28ccf95 commit 2aac389

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/rspec/rails/example/system_example_group.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ def passed?
3636
def method_name
3737
@method_name ||= [
3838
self.class.name.underscore,
39-
RSpec.current_example.description.underscore,
40-
rand(1000)
41-
].join("_").tr(CHARS_TO_TRANSLATE.join, "_")
39+
RSpec.current_example.description.underscore
40+
].join("_").tr(CHARS_TO_TRANSLATE.join, "_")[0...251] + "_#{rand(1000)}"
4241
end
4342

4443
# Delegates to `Rails.application`.

0 commit comments

Comments
 (0)