diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-08-17 21:53:33 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-08-17 21:53:33 +0200 |
commit | f7e625b2221e515b0cc2c5ecedaa57e32ddd8cf8 (patch) | |
tree | 6819bc419043b294ba56add4f7786e4891eccd09 /activesupport/lib/active_support | |
parent | 2778293ec50d8cccf7ba84975d048f53f2708283 (diff) | |
parent | e49c2cd743eaf3fbaa1215e4922b2a59f8e3b5f8 (diff) | |
download | rails-f7e625b2221e515b0cc2c5ecedaa57e32ddd8cf8.tar.gz rails-f7e625b2221e515b0cc2c5ecedaa57e32ddd8cf8.tar.bz2 rails-f7e625b2221e515b0cc2c5ecedaa57e32ddd8cf8.zip |
Merge pull request #21244 from ronakjangir47/method_call_assertions_fix
Replacing lambda with proc getting argument error because of it.
Diffstat (limited to 'activesupport/lib/active_support')
-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" |