Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
More 1.8.7 fixes
  • Loading branch information
JonRowe authored and pirj committed Dec 28, 2023
1 parent 3c52f5a commit 9b44765
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions spec/rspec/matchers/built_in/compound_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ def actual
EOS

expect {
expect("HELLO\nWORLD")
.to eq_downcase("bonjour\nmonde")
.and eq_downcase("hola\nmon")
expect(
"HELLO\nWORLD"
).to eq_downcase("bonjour\nmonde").and eq_downcase("hola\nmon")
}.to fail do |error|
expect(error.message).to include(expected_failure)
end
Expand Down Expand Up @@ -626,9 +626,9 @@ def actual
EOS

expect {
expect("HELLO\nWORLD")
.to eq_downcase("bonjour\nmonde")
.and eq_downcase("hola\nmon")
expect(
"HELLO\nWORLD"
).to eq_downcase("bonjour\nmonde").and eq_downcase("hola\nmon")
}.to fail do |error|
expect(error.message).to include(expected_failure)
end
Expand Down
6 changes: 3 additions & 3 deletions spec/rspec/matchers/built_in/output_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ def print_to_stream(msg)
RSpec.describe "can capture stdin and stderr" do
it "prints diff for both when both fail" do
expect {
expect { print "foo"; $stderr.print("bar") }
.to output(/baz/).to_stdout
.and output(/qux/).to_stderr
expect {
print "foo"; $stderr.print("bar")
}.to output(/baz/).to_stdout.and output(/qux/).to_stderr
}.to fail_including(
'expected block to output /baz/ to stdout, but output "foo"',
'...and:',
Expand Down

0 comments on commit 9b44765

Please sign in to comment.