Avoid warning when running tests
This commit is contained in:
parent
f7420463fd
commit
a9d89d23df
@ -2,19 +2,24 @@ module ActionController
|
||||
module Integration
|
||||
|
||||
class Session
|
||||
|
||||
unless instance_methods.include?("put_via_redirect")
|
||||
# Waiting for http://dev.rubyonrails.org/ticket/10497 to be committed.
|
||||
def put_via_redirect(path, parameters = {}, headers = {})
|
||||
put path, parameters, headers
|
||||
follow_redirect! while redirect?
|
||||
status
|
||||
end
|
||||
end
|
||||
|
||||
unless instance_methods.include?("delete_via_redirect")
|
||||
# Waiting for http://dev.rubyonrails.org/ticket/10497 to be committed.
|
||||
def delete_via_redirect(path, parameters = {}, headers = {})
|
||||
delete path, parameters, headers
|
||||
follow_redirect! while redirect?
|
||||
status
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
@ -454,7 +454,7 @@ module ActionController
|
||||
end
|
||||
|
||||
def dom # :nodoc:
|
||||
return @dom if @dom
|
||||
return @dom if defined?(@dom) && @dom
|
||||
raise "You must visit a path before working with the page." unless response
|
||||
@dom = Hpricot(response.body)
|
||||
add_default_params
|
||||
|
@ -4,9 +4,13 @@ require "test/unit"
|
||||
begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
|
||||
require "mocha"
|
||||
|
||||
|
||||
require "active_support"
|
||||
require "action_controller"
|
||||
require "action_controller/integration"
|
||||
|
||||
silence_warnings do
|
||||
require "action_controller"
|
||||
require "action_controller/integration"
|
||||
end
|
||||
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user