diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/test/difference.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/test/difference.rb b/activesupport/lib/active_support/core_ext/test/difference.rb index 7b22b32d26..17cac8919d 100644 --- a/activesupport/lib/active_support/core_ext/test/difference.rb +++ b/activesupport/lib/active_support/core_ext/test/difference.rb @@ -20,7 +20,7 @@ module Test #:nodoc: # post :delete, :id => ... # end def assert_difference(expression, difference = 1, &block) - expression_evaluation = lambda { eval(expression) } + expression_evaluation = lambda { eval(expression, block.binding) } original_value = expression_evaluation.call yield assert_equal original_value + difference, expression_evaluation.call |