@@ -475,7 +475,7 @@ def failure_message_when_negated
475475
476476 # Override to use the whole object, not just part of it
477477 def actual_for_matcher_text
478- description_of ( @ actual)
478+ description_of ( actual )
479479 end
480480
481481 # Override to use (...) as delimiters rather than {...}
@@ -485,17 +485,17 @@ def expected_for_matcher_text
485485
486486 # Override so that the differ knows that this is a partial object
487487 def actual_for_diff
488- @ actual
488+ actual
489489 end
490490
491491 # Override so that the differ knows that this is a partial object
492492 def expected_for_diff
493493 if respond_to_failed
494494 matchers . an_object_having_attributes (
495- @ expected. select { |k , v | !@ actual. respond_to? ( k ) }
495+ expected . select { |k , v | !actual . respond_to? ( k ) }
496496 )
497497 else
498- matchers . an_object_having_attributes ( @ expected)
498+ matchers . an_object_having_attributes ( expected )
499499 end
500500 end
501501 end )
@@ -504,7 +504,7 @@ def expected_for_diff
504504 # proper diff
505505 def respond_to_attributes?
506506 cache_all_values
507- matches = respond_to_matcher . matches? ( @ actual)
507+ matches = respond_to_matcher . matches? ( actual )
508508 @respond_to_failed = !matches
509509 matches
510510 end
@@ -513,8 +513,8 @@ def respond_to_attributes?
513513 # public_send
514514 def cache_all_values
515515 @values = @expected . keys . inject ( { } ) do |hash , attribute_key |
516- if @ actual. respond_to? ( attribute_key )
517- actual_value = @ actual. public_send ( attribute_key )
516+ if actual . respond_to? ( attribute_key )
517+ actual_value = actual . public_send ( attribute_key )
518518 hash . merge ( attribute_key => actual_value )
519519 else
520520 hash
0 commit comments