From 63a70ad6ff3223e20ae27c6738dc6bc7d2c6c11c Mon Sep 17 00:00:00 2001 From: Ronak Jangir Date: Sat, 15 Aug 2015 17:38:18 +0530 Subject: Cleaned up generators tests using internal assertion helper --- activesupport/test/testing/method_call_assertions_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test') 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 -- cgit v1.2.3