Rename :rack_test mode to :rack
This commit is contained in:
parent
3e7886ecab
commit
0a3b979772
@ -16,8 +16,8 @@ module Webrat
|
|||||||
end
|
end
|
||||||
|
|
||||||
def webrat_session
|
def webrat_session
|
||||||
if Webrat.configuration.mode == :rack_test
|
if Webrat.configuration.mode == :rack
|
||||||
@_webrat_session ||= ::Webrat::RackTestSession.new(rack_test_session)
|
@_webrat_session ||= ::Webrat::RackSession.new(rack_test_session)
|
||||||
else
|
else
|
||||||
@_webrat_session ||= ::Webrat.session_class.new(self)
|
@_webrat_session ||= ::Webrat.session_class.new(self)
|
||||||
end
|
end
|
||||||
|
@ -24,8 +24,8 @@ module Webrat
|
|||||||
SinatraSession
|
SinatraSession
|
||||||
when :mechanize
|
when :mechanize
|
||||||
MechanizeSession
|
MechanizeSession
|
||||||
when :rack_test
|
when :rack
|
||||||
RackTestSession
|
RackSession
|
||||||
else
|
else
|
||||||
raise WebratError.new(<<-STR)
|
raise WebratError.new(<<-STR)
|
||||||
Unknown Webrat mode: #{Webrat.configuration.mode.inspect}
|
Unknown Webrat mode: #{Webrat.configuration.mode.inspect}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
module Webrat
|
module Webrat
|
||||||
class RackTestSession < Session
|
class RackSession < Session
|
||||||
|
|
||||||
def initialize(rack_test_session) #:nodoc:
|
def initialize(rack_test_session) #:nodoc:
|
||||||
super()
|
super()
|
@ -6,7 +6,7 @@ require "rack/test"
|
|||||||
require File.dirname(__FILE__) + "/../../../../lib/webrat"
|
require File.dirname(__FILE__) + "/../../../../lib/webrat"
|
||||||
|
|
||||||
Webrat.configure do |config|
|
Webrat.configure do |config|
|
||||||
config.mode = :rack_test
|
config.mode = :rack
|
||||||
end
|
end
|
||||||
|
|
||||||
class Test::Unit::TestCase
|
class Test::Unit::TestCase
|
||||||
|
Loading…
Reference in New Issue
Block a user