From 35f38b71dfeacbb4f92a2b1bf4d151c2061700d5 Mon Sep 17 00:00:00 2001 From: zires Date: Tue, 26 Feb 2013 13:09:13 +0800 Subject: Make ActionDispatch::Journey::Path::Pattern#new raise more meaningful exception message. --- actionpack/test/journey/path/pattern_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/journey/path') diff --git a/actionpack/test/journey/path/pattern_test.rb b/actionpack/test/journey/path/pattern_test.rb index 2b7227cd0d..ce02104181 100644 --- a/actionpack/test/journey/path/pattern_test.rb +++ b/actionpack/test/journey/path/pattern_test.rb @@ -75,6 +75,10 @@ module ActionDispatch end end + def test_to_raise_exception_with_bad_expression + assert_raise(ArgumentError, "Bad expression: []") { Pattern.new [] } + end + def test_to_regexp_with_extended_group strexp = Router::Strexp.new( '/page/:name', -- cgit v1.2.3