lib/rspec/expectations/fail_with.rb in rspec-expectations-2.9.0 vs lib/rspec/expectations/fail_with.rb in rspec-expectations-2.9.1

- old
+ new

@@ -3,11 +3,11 @@ class << self # @private def differ @differ ||= Differ.new end - + # Raises an RSpec::Expectations::ExpectationNotMetError with message. # @param [String] message # @param [Object] expected # @param [Object] actual # @@ -20,9 +20,10 @@ end if actual && expected if all_strings?(actual, expected) if any_multiline_strings?(actual, expected) + expected = expected.join(',') if Array === expected message << "\nDiff:" << differ.diff_as_string(actual, expected) end elsif no_procs?(actual, expected) && no_numbers?(actual, expected) message << "\nDiff:" << differ.diff_as_object(actual, expected) end