Skip to content

Commit f07f09b

Browse files
committed
Use MSpec.format instead of #inspect in the #output matcher
1 parent 9e904e7 commit f07f09b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/mspec/lib/mspec/matchers/output.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def failure_message
4242
expected_out = "\n"
4343
actual_out = "\n"
4444
unless @out.nil?
45-
expected_out += " $stdout: #{@out.inspect}\n"
46-
actual_out += " $stdout: #{@stdout.inspect}\n"
45+
expected_out += " $stdout: #{MSpec.format(@out)}\n"
46+
actual_out += " $stdout: #{MSpec.format(@stdout.to_s)}\n"
4747
end
4848
unless @err.nil?
49-
expected_out += " $stderr: #{@err.inspect}\n"
50-
actual_out += " $stderr: #{@stderr.inspect}\n"
49+
expected_out += " $stderr: #{MSpec.format(@err)}\n"
50+
actual_out += " $stderr: #{MSpec.format(@stderr.to_s)}\n"
5151
end
5252
["Expected:#{expected_out}", " got:#{actual_out}"]
5353
end

0 commit comments

Comments
 (0)