diff options
author | Carl Lerche <me@carllerche.com> | 2012-07-10 16:16:00 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2012-07-10 16:17:02 -0700 |
commit | afa68eb1766d8893a1bb79bf989061f3d8f98049 (patch) | |
tree | 922b93a69e426c53918310070e98f25f2aff7d61 /actionpack/test | |
parent | 89dc4813520c38e4ec62d3ab9b8fda8254987327 (diff) | |
download | rails-afa68eb1766d8893a1bb79bf989061f3d8f98049.tar.gz rails-afa68eb1766d8893a1bb79bf989061f3d8f98049.tar.bz2 rails-afa68eb1766d8893a1bb79bf989061f3d8f98049.zip |
Raise a helpful error message on #mount misuse
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/mapper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb index 8070bdec8a..58457b0c28 100644 --- a/actionpack/test/dispatch/mapper_test.rb +++ b/actionpack/test/dispatch/mapper_test.rb @@ -98,6 +98,15 @@ module ActionDispatch mapper.get '/*path', :to => 'pages#show', :format => true assert_equal '/*path.:format', fakeset.conditions.first[:path_info] end + + def test_raising_helpful_error_on_invalid_arguments + fakeset = FakeSet.new + mapper = Mapper.new fakeset + app = lambda { |env| [200, {}, [""]] } + assert_raises ArgumentError do + mapper.mount app + end + end end end end |