Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

self-less

  • Loading branch information...
commit 7ae080e4cdda97ce99d353cc91dc2585eb03ec44 1 parent 82eba3f
@dchelimsky dchelimsky authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/rspec/expectations/fail_with.rb
View
6 lib/rspec/expectations/fail_with.rb
@@ -11,7 +11,7 @@ def differ
# @param [Object] expected
# @param [Object] actual
#
- # Adds a diff to the failure message when +expected+ and +actual+ are
+ # Adds a diff to the failure message when `expected` and `actual` are
# both present.
def fail_with(message, expected=nil, actual=nil)
if !message
@@ -22,10 +22,10 @@ def fail_with(message, expected=nil, actual=nil)
if actual && expected
if all_strings?(actual, expected)
if any_multiline_strings?(actual, expected)
- message << "\nDiff:" << self.differ.diff_as_string(actual, expected)
+ message << "\nDiff:" << differ.diff_as_string(actual, expected)
end
elsif no_procs?(actual, expected) && no_numbers?(actual, expected)
- message << "\nDiff:" << self.differ.diff_as_object(actual, expected)
+ message << "\nDiff:" << differ.diff_as_object(actual, expected)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.