Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit dd56e6f

Browse files
committed
Remove StdErrSplitter workarounds
Kept gems warning muted due to: 1. RuntimeError: Warnings were generated: /home/runner/work/rspec-support/bundle/ruby/2.5.0/gems/actioncable-6.0.3.4/lib/action_cable/channel/test_case.rb:178: warning: method redefined; discarding old connection Shared Example Group: "an rspec-rails example group mixin" called from ./spec/rspec/rails/example/channel_example_group_spec.rb:6 # /home/runner/work/rspec-support/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:38:in `verify_no_warnings!' 2. RuntimeError: Warnings were generated: /home/runner/work/rspec-support/bundle/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_dispatch/routing/route_set.rb:560: warning: instance variable @_routes not initialized Shared Example Group: "an rspec-rails example group mixin" called from ./spec/rspec/rails/example/view_example_group_spec.rb:5 # /home/runner/work/rspec-support/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:38:in `verify_no_warnings!'
1 parent d181a28 commit dd56e6f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/rspec/support/spec/stderr_splitter.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,8 @@ def reopen(*args)
2727
@orig_stderr.reopen(*args)
2828
end
2929

30-
# To work around JRuby error:
31-
# can't convert RSpec::Support::StdErrSplitter into String
32-
def to_io
33-
@orig_stderr.to_io
34-
end
35-
36-
# To work around JRuby error:
37-
# TypeError: $stderr must have write method, RSpec::StdErrSplitter given
3830
def write(line)
31+
# Ignore warnings coming from gems, specifically Rails on Ruby 2.5+
3932
return if line =~ %r{^\S+/gems/\S+:\d+: warning:} # http://rubular.com/r/kqeUIZOfPG
4033

4134
# Ruby 2.7.0 warnings from keyword argments span multiple lines, extend check above

0 commit comments

Comments
 (0)