diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-22 10:59:47 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-22 11:05:03 -0800 |
commit | a328f2ffd2d7764c92c87505d0b43f9e3a8c8f28 (patch) | |
tree | 85ec3d70dfd6c2fc1a08acbf5088f824c11898ba | |
parent | 36d9fd7332e8f9de2cdf930525481dd22cb76849 (diff) | |
download | rails-a328f2ffd2d7764c92c87505d0b43f9e3a8c8f28.tar.gz rails-a328f2ffd2d7764c92c87505d0b43f9e3a8c8f28.tar.bz2 rails-a328f2ffd2d7764c92c87505d0b43f9e3a8c8f28.zip |
add some tests, yay!
-rw-r--r-- | actionpack/test/routing/helper_test.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/actionpack/test/routing/helper_test.rb b/actionpack/test/routing/helper_test.rb new file mode 100644 index 0000000000..a5588d95fa --- /dev/null +++ b/actionpack/test/routing/helper_test.rb @@ -0,0 +1,31 @@ +require 'abstract_unit' + +module ActionDispatch + module Routing + class HelperTest < ActiveSupport::TestCase + class Duck + def to_param + nil + end + end + + def test_exception + rs = ::ActionDispatch::Routing::RouteSet.new + rs.draw do + resources :ducks do + member do + get :pond + end + end + end + + x = Class.new { + include rs.url_helpers + } + assert_raises ActionController::RoutingError do + x.new.pond_duck_path Duck.new + end + end + end + end +end |