aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_assertions_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-05 16:43:14 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-05 16:43:14 -0300
commit3f720d580f019f79f93f53733f03f28651a37031 (patch)
tree11876aca83de46a2a1c09bf6413639e0c517a445 /actionpack/test/dispatch/routing_assertions_test.rb
parentccbb48196efe06a0c1c360951caff74ee74a8d14 (diff)
parent31c3eec05d2ad50f93f3e7a7bc30ec33f2a5c768 (diff)
downloadrails-3f720d580f019f79f93f53733f03f28651a37031.tar.gz
rails-3f720d580f019f79f93f53733f03f28651a37031.tar.bz2
rails-3f720d580f019f79f93f53733f03f28651a37031.zip
Merge pull request #14911 from estsauver/14908
Propagate test messages through assert_routing helper, Fixes #14908
Diffstat (limited to 'actionpack/test/dispatch/routing_assertions_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_assertions_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb
index aea4489852..2116aa2746 100644
--- a/actionpack/test/dispatch/routing_assertions_test.rb
+++ b/actionpack/test/dispatch/routing_assertions_test.rb
@@ -78,6 +78,14 @@ class RoutingAssertionsTest < ActionController::TestCase
assert_routing('/articles', :controller => 'articles', :action => 'index')
end
+ def test_assert_routing_raises_message
+ err = assert_raise(Assertion) do
+ assert_routing('/thisIsNotARoute', { :controller => 'articles', :action => 'edit', :id => '1' }, { :id => '1' }, {}, "This is a really bad msg")
+ end
+
+ assert_match err.message, "This is a really bad msg"
+ end
+
def test_assert_routing_with_defaults
assert_routing('/articles/1/edit', { :controller => 'articles', :action => 'edit', :id => '1' }, { :id => '1' })
end