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
def webrat_session
if Webrat.configuration.mode == :rack_test
@_webrat_session ||= ::Webrat::RackTestSession.new(rack_test_session)
if Webrat.configuration.mode == :rack
@_webrat_session ||= ::Webrat::RackSession.new(rack_test_session)
else
@_webrat_session ||= ::Webrat.session_class.new(self)
end

View File

@ -24,8 +24,8 @@ module Webrat
SinatraSession
when :mechanize
MechanizeSession
when :rack_test
RackTestSession
when :rack
RackSession
else
raise WebratError.new(<<-STR)
Unknown Webrat mode: #{Webrat.configuration.mode.inspect}

View File

@ -1,5 +1,5 @@
module Webrat
class RackTestSession < Session
class RackSession < Session
def initialize(rack_test_session) #:nodoc:
super()

View File

@ -6,7 +6,7 @@ require "rack/test"
require File.dirname(__FILE__) + "/../../../../lib/webrat"
Webrat.configure do |config|
config.mode = :rack_test
config.mode = :rack
end
class Test::Unit::TestCase