Rename :rack_test mode to :rack

This commit is contained in:
Simon Rozet 2009-06-12 21:04:14 +02:00
parent 3e7886ecab
commit 0a3b979772
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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}

View File

@ -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()

View File

@ -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