@@ -475,7 +475,7 @@ def failure_message_when_negated
475
475
476
476
# Override to use the whole object, not just part of it
477
477
def actual_for_matcher_text
478
- description_of ( @ actual)
478
+ description_of ( actual )
479
479
end
480
480
481
481
# Override to use (...) as delimiters rather than {...}
@@ -485,17 +485,17 @@ def expected_for_matcher_text
485
485
486
486
# Override so that the differ knows that this is a partial object
487
487
def actual_for_diff
488
- @ actual
488
+ actual
489
489
end
490
490
491
491
# Override so that the differ knows that this is a partial object
492
492
def expected_for_diff
493
493
if respond_to_failed
494
494
matchers . an_object_having_attributes (
495
- @ expected. select { |k , v | !@ actual. respond_to? ( k ) }
495
+ expected . select { |k , v | !actual . respond_to? ( k ) }
496
496
)
497
497
else
498
- matchers . an_object_having_attributes ( @ expected)
498
+ matchers . an_object_having_attributes ( expected )
499
499
end
500
500
end
501
501
end )
@@ -504,7 +504,7 @@ def expected_for_diff
504
504
# proper diff
505
505
def respond_to_attributes?
506
506
cache_all_values
507
- matches = respond_to_matcher . matches? ( @ actual)
507
+ matches = respond_to_matcher . matches? ( actual )
508
508
@respond_to_failed = !matches
509
509
matches
510
510
end
@@ -513,8 +513,8 @@ def respond_to_attributes?
513
513
# public_send
514
514
def cache_all_values
515
515
@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 )
518
518
hash . merge ( attribute_key => actual_value )
519
519
else
520
520
hash
0 commit comments