Skip to content

Commit 34d8ae9

Browse files
Takumi Kajisebjacobs
authored andcommitted
Truncate method names further in system tests (rspec#2058)
* Truncate method names further in system tests ref: https://github.com/rspec/rspec-rails/pull/1999/files If system test fails, a screenshot is taken, but if the file name exceeds 255 characters(e.g. using turnip), the following error will be output. ``` File name too long @ rb_sysopen ``` The file name is prepended with `failures_` so further truncation is needed.
1 parent 1d88b48 commit 34d8ae9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/rails/example/system_example_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def method_name
3737
@method_name ||= [
3838
self.class.name.underscore,
3939
RSpec.current_example.description.underscore
40-
].join("_").tr(CHARS_TO_TRANSLATE.join, "_")[0...251] + "_#{rand(1000)}"
40+
].join("_").tr(CHARS_TO_TRANSLATE.join, "_")[0...200] + "_#{rand(1000)}"
4141
end
4242

4343
# Delegates to `Rails.application`.

0 commit comments

Comments
 (0)