fix method redefined warnings in tests

This commit is contained in:
lest
2011-11-30 18:34:16 +03:00
parent 2b96b20f3a
commit 565d92f578
3 changed files with 5 additions and 12 deletions

View File

@@ -351,3 +351,8 @@ module ActionDispatch
end
end
module RoutingTestHelpers
def url_for(set, options, recall = nil)
set.send(:url_for, options.merge(:only_path => true, :_path_segments => recall))
end
end

View File

@@ -11,12 +11,6 @@ end
ROUTING = ActionDispatch::Routing
module RoutingTestHelpers
def url_for(set, options, recall = nil)
set.send(:url_for, options.merge(:only_path => true, :_path_segments => recall))
end
end
# See RFC 3986, section 3.3 for allowed path characters.
class UriReservedCharactersRoutingTest < Test::Unit::TestCase
include RoutingTestHelpers

View File

@@ -3,12 +3,6 @@ require 'abstract_unit'
require 'controller/fake_controllers'
require 'active_support/core_ext/object/with_options'
module RoutingTestHelpers
def url_for(set, options, recall = nil)
set.send(:url_for, options.merge(:only_path => true, :_path_segments => recall))
end
end
module ActionPack
class URLForIntegrationTest < ActiveSupport::TestCase
include RoutingTestHelpers