aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/testing
diff options
context:
space:
mode:
authorRonak Jangir <ronakjangir47@gmail.com>2015-08-15 17:38:18 +0530
committerRonak Jangir <ronakjangir47@gmail.com>2015-08-20 09:22:56 +0530
commit63a70ad6ff3223e20ae27c6738dc6bc7d2c6c11c (patch)
treee6f1a888252546c9de756706fe35716c97aba609 /activesupport/test/testing
parentc42db41f54adbcd981cbd4cc725e342fb3591176 (diff)
downloadrails-63a70ad6ff3223e20ae27c6738dc6bc7d2c6c11c.tar.gz
rails-63a70ad6ff3223e20ae27c6738dc6bc7d2c6c11c.tar.bz2
rails-63a70ad6ff3223e20ae27c6738dc6bc7d2c6c11c.zip
Cleaned up generators tests using internal assertion helper
Diffstat (limited to 'activesupport/test/testing')
-rw-r--r--activesupport/test/testing/method_call_assertions_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/testing/method_call_assertions_test.rb b/activesupport/test/testing/method_call_assertions_test.rb
index 2939cf0233..3e5ba7c079 100644
--- a/activesupport/test/testing/method_call_assertions_test.rb
+++ b/activesupport/test/testing/method_call_assertions_test.rb
@@ -33,6 +33,12 @@ class MethodCallAssertionsTest < ActiveSupport::TestCase
end
end
+ def test_assert_called_returns
+ assert_called(@object, :increment, returns: 10) do
+ assert_equal 10, @object.increment
+ end
+ end
+
def test_assert_called_failure
error = assert_raises(Minitest::Assertion) do
assert_called(@object, :increment) do