From a328f2ffd2d7764c92c87505d0b43f9e3a8c8f28 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 22 Feb 2012 10:59:47 -0800 Subject: add some tests, yay! --- actionpack/test/routing/helper_test.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 actionpack/test/routing/helper_test.rb (limited to 'actionpack/test/routing') 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 -- cgit v1.2.3