aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/assertions
diff options
context:
space:
mode:
authorVictor Costan <costan@gmail.com>2013-11-24 22:46:58 -0500
committerVictor Costan <costan@gmail.com>2013-11-25 03:09:02 -0500
commitc759a93454b10d9a908d3a3a102546fc70160b91 (patch)
tree1884d7aac3fc0d32bc45bafa7cf53f22a63493eb /actionpack/test/assertions
parent9dc89f3fc425af5cfc5fa5ea3809e554db017653 (diff)
downloadrails-c759a93454b10d9a908d3a3a102546fc70160b91.tar.gz
rails-c759a93454b10d9a908d3a3a102546fc70160b91.tar.bz2
rails-c759a93454b10d9a908d3a3a102546fc70160b91.zip
Better error message for typos in assert_response argument.
This commit makes it really easy to debug errors due to typos like "assert_response :succezz".
Diffstat (limited to 'actionpack/test/assertions')
-rw-r--r--actionpack/test/assertions/response_assertions_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/assertions/response_assertions_test.rb b/actionpack/test/assertions/response_assertions_test.rb
index ca1d58765d..8eec98e916 100644
--- a/actionpack/test/assertions/response_assertions_test.rb
+++ b/actionpack/test/assertions/response_assertions_test.rb
@@ -50,6 +50,14 @@ module ActionDispatch
assert_response :success
}
end
+
+ def test_assert_response_sym_typo
+ @response = FakeResponse.new 200
+
+ assert_raises(ArgumentError) {
+ assert_response :succezz
+ }
+ end
end
end
end