From 0a3b979772d02f4cee1de84c91d1c7af9448566a Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Fri, 12 Jun 2009 21:04:14 +0200 Subject: [PATCH] Rename :rack_test mode to :rack --- lib/webrat/core/methods.rb | 4 ++-- lib/webrat/core/session.rb | 4 ++-- lib/webrat/{rack_test.rb => rack.rb} | 2 +- spec/integration/rack/test/test_helper.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename lib/webrat/{rack_test.rb => rack.rb} (94%) diff --git a/lib/webrat/core/methods.rb b/lib/webrat/core/methods.rb index 84f0bbd..8569859 100644 --- a/lib/webrat/core/methods.rb +++ b/lib/webrat/core/methods.rb @@ -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 diff --git a/lib/webrat/core/session.rb b/lib/webrat/core/session.rb index eda7377..af707c9 100644 --- a/lib/webrat/core/session.rb +++ b/lib/webrat/core/session.rb @@ -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} diff --git a/lib/webrat/rack_test.rb b/lib/webrat/rack.rb similarity index 94% rename from lib/webrat/rack_test.rb rename to lib/webrat/rack.rb index b824cee..147d718 100644 --- a/lib/webrat/rack_test.rb +++ b/lib/webrat/rack.rb @@ -1,5 +1,5 @@ module Webrat - class RackTestSession < Session + class RackSession < Session def initialize(rack_test_session) #:nodoc: super() diff --git a/spec/integration/rack/test/test_helper.rb b/spec/integration/rack/test/test_helper.rb index 1902cef..d7532de 100644 --- a/spec/integration/rack/test/test_helper.rb +++ b/spec/integration/rack/test/test_helper.rb @@ -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