diff options
author | Ronak Jangir <ronakjangir47@gmail.com> | 2015-06-11 21:48:33 +0530 |
---|---|---|
committer | Ronak Jangir <ronakjangir47@gmail.com> | 2015-07-10 01:58:46 +0530 |
commit | 2f28e5b6417fd4e5d6060983b36262737558b613 (patch) | |
tree | 45995ea4b862720ba7788649bbd4d6d31a3eb16e /activesupport/test/deprecation_test.rb | |
parent | 5ea8efecd08a71ca78688105a39b8a94236443ed (diff) | |
download | rails-2f28e5b6417fd4e5d6060983b36262737558b613.tar.gz rails-2f28e5b6417fd4e5d6060983b36262737558b613.tar.bz2 rails-2f28e5b6417fd4e5d6060983b36262737558b613.zip |
Removed use of mocha in active_support
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r-- | activesupport/test/deprecation_test.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 20bd8ee5dd..7e8844b301 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -256,17 +256,17 @@ class DeprecationTest < ActiveSupport::TestCase end def test_deprecate_with_custom_deprecator - custom_deprecator = mock('Deprecator') do - expects(:deprecation_warning) - end + custom_deprecator = Struct.new(:deprecation_warning).new - klass = Class.new do - def method + assert_called_with(custom_deprecator, :deprecation_warning, [:method, nil]) do + klass = Class.new do + def method + end + deprecate :method, deprecator: custom_deprecator end - deprecate :method, deprecator: custom_deprecator - end - klass.new.method + klass.new.method + end end def test_deprecated_constant_with_deprecator_given |