rails/activesupport/test/cache
bogdanvlviv 9d0cf52096
assert_called_with should require args argument
There are two main reasons why `assert_called_with` should require
`args` argument:

1) If we want to assert that some method should be called and we don't
   need to check with which arguments it should be called then we should use
   `assert_called`.

2) `assert_called_with` without `args` argument doesn't assert anything!
   ```ruby
   assert_called_with(@object, :increment) do
      @object.decrement
   end
   ```
   It causes false assertions in tests that could cause regressions in the project.

I found this bug by working on
[minitest-mock_expectations](https://github.com/bogdanvlviv/minitest-mock_expectations) gem.
This gem is an extension for minitest that provides almost the same method call
assertions.
I was wondering whether you would consider adding "minitest-mock_expectations"
to `rails/rails` instead of private `ActiveSupport::Testing::MethodCallAssertions` module.
If yes, I'll send a patch - a970ecc42c
2018-10-25 21:29:39 +03:00
..
behaviors assert_called_with should require args argument 2018-10-25 21:29:39 +03:00
stores Turn on performance based cops 2018-07-23 15:37:06 -07:00
behaviors.rb Add missing instrumentation to RedisCacheStore#read_multi 2018-02-05 11:57:14 -08:00
cache_entry_test.rb Fix CustomCops/AssertNot to allow it to have failure message 2018-05-13 11:32:47 +09:00
cache_key_test.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
cache_store_logger_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
cache_store_namespace_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
cache_store_setting_test.rb [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
local_cache_middleware_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00