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