diff options
author | zires <zshuaibin@gmail.com> | 2013-02-26 13:09:13 +0800 |
---|---|---|
committer | zires <zshuaibin@gmail.com> | 2013-02-27 08:26:51 +0800 |
commit | 35f38b71dfeacbb4f92a2b1bf4d151c2061700d5 (patch) | |
tree | 9fb527947f50df39ff1f8e1d4adaee6f497d5e34 /actionpack/test/journey/path | |
parent | 202041e762a98cb433c3a24a0b03308d4e05a99d (diff) | |
download | rails-35f38b71dfeacbb4f92a2b1bf4d151c2061700d5.tar.gz rails-35f38b71dfeacbb4f92a2b1bf4d151c2061700d5.tar.bz2 rails-35f38b71dfeacbb4f92a2b1bf4d151c2061700d5.zip |
Make ActionDispatch::Journey::Path::Pattern#new raise more meaningful exception message.
Diffstat (limited to 'actionpack/test/journey/path')
-rw-r--r-- | actionpack/test/journey/path/pattern_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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', |