diff options
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/method_call_assertions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/method_call_assertions.rb b/activesupport/lib/active_support/testing/method_call_assertions.rb index 517f02e3ef..155d3344d3 100644 --- a/activesupport/lib/active_support/testing/method_call_assertions.rb +++ b/activesupport/lib/active_support/testing/method_call_assertions.rb @@ -5,7 +5,7 @@ module ActiveSupport def assert_called(object, method_name, message = nil, times: 1) times_called = 0 - object.stub(method_name, -> { times_called += 1 }) { yield } + object.stub(method_name, proc { times_called += 1 }) { yield } error = "Expected #{method_name} to be called #{times} times, " \ "but was called #{times_called} times" |