aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-10-25 16:20:47 -0400
committerGitHub <noreply@github.com>2018-10-25 16:20:47 -0400
commitc4fd38a206a82323b14ad41550f04a2258af955a (patch)
tree009d3e5539acdbf0da3bc08797cbc8442b0e051e /activesupport/test
parenta3dcba42e2422eb9c2e77011a39ce72dc934b420 (diff)
parent9d0cf52096dd6f7cb4b153984630eed97dcd8a8c (diff)
downloadrails-c4fd38a206a82323b14ad41550f04a2258af955a.tar.gz
rails-c4fd38a206a82323b14ad41550f04a2258af955a.tar.bz2
rails-c4fd38a206a82323b14ad41550f04a2258af955a.zip
Merge pull request #34317 from bogdanvlviv/fix-assert_called_with
`assert_called_with` should require `args` argument
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb2
-rw-r--r--activesupport/test/testing/method_call_assertions_test.rb12
2 files changed, 1 insertions, 13 deletions
diff --git a/activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb b/activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb
index 4e8ff60eb3..a4abdd37b9 100644
--- a/activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb
+++ b/activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb
@@ -2,7 +2,7 @@
module CacheInstrumentationBehavior
def test_fetch_multi_uses_write_multi_entries_store_provider_interface
- assert_called_with(@cache, :write_multi_entries) do
+ assert_called(@cache, :write_multi_entries) do
@cache.fetch_multi "a", "b", "c" do |key|
key * 2
end
diff --git a/activesupport/test/testing/method_call_assertions_test.rb b/activesupport/test/testing/method_call_assertions_test.rb
index 7438a0490e..669463bd31 100644
--- a/activesupport/test/testing/method_call_assertions_test.rb
+++ b/activesupport/test/testing/method_call_assertions_test.rb
@@ -60,12 +60,6 @@ class MethodCallAssertionsTest < ActiveSupport::TestCase
assert_match(/dang it.\nExpected increment/, error.message)
end
- def test_assert_called_with
- assert_called_with(@object, :increment) do
- @object.increment
- end
- end
-
def test_assert_called_with_arguments
assert_called_with(@object, :<<, [ 2 ]) do
@object << 2
@@ -88,12 +82,6 @@ class MethodCallAssertionsTest < ActiveSupport::TestCase
end
end
- def test_assert_called_with_returns
- assert_called_with(@object, :increment, returns: 1) do
- @object.increment
- end
- end
-
def test_assert_called_with_multiple_expected_arguments
assert_called_with(@object, :<<, [ [ 1 ], [ 2 ] ]) do
@object << 1