Permalink
Browse files

Rename MerbSession to MerbAdapter

  • Loading branch information...
1 parent 22a0600 commit 986682488efbbb9e2380ba5e1105d9291b6cc59e @brynary brynary committed Aug 13, 2009
@@ -91,7 +91,7 @@ def mode=(mode)
# with Merb 1.0.8 until it's updated to use the new Webrat.configure
# syntax
if @mode == :merb
- require("webrat/merb_session")
+ require("webrat/merb_adapter")
else
require("webrat/#{mode}")
end
@@ -21,7 +21,7 @@ def self.adapter_class
when :rails
RailsSession
when :merb
- MerbSession
+ MerbAdapter
when :rack
RackAdapter
when :rack_test
@@ -3,7 +3,7 @@
require "webrat/merb_multipart_support"
module Webrat
- class MerbSession #:nodoc:
+ class MerbAdapter #:nodoc:
include Merb::Test::MakeRequest
# Include Webrat's own version of multipart_post/put because the officially
@@ -74,7 +74,7 @@ module Merb #:nodoc:
module Test #:nodoc:
module RequestHelper #:nodoc:
def request(uri, env = {})
- @_webrat_session ||= Webrat::MerbSession.new
+ @_webrat_session ||= Webrat::MerbAdapter.new
@_webrat_session.response = @_webrat_session.request(uri, env)
end
end
@@ -68,9 +68,9 @@
end
end
- it "should require merb_session when in merb mode" do
+ it "should require merb_adapter when in merb mode" do
config = Webrat::Configuration.new
- config.should_receive(:require).with("webrat/merb_session")
+ config.should_receive(:require).with("webrat/merb_adapter")
config.mode = :merb
end
@@ -2,9 +2,9 @@
require "webrat/merb"
-describe Webrat::MerbSession do
+describe Webrat::MerbAdapter do
it "should not pass empty params if data is and empty hash" do
- session = Webrat::MerbSession.new
+ session = Webrat::MerbAdapter.new
response = OpenStruct.new
response.status = 200
session.should_receive(:request).with('url', {:params=> nil, :method=>"GET", :headers=>nil}).and_return(response)
@@ -13,7 +13,7 @@
%w{post put delete}.each do |request_method|
it "should call do request with method #{request_method.upcase} for a #{request_method} call" do
- session = Webrat::MerbSession.new
+ session = Webrat::MerbAdapter.new
response = OpenStruct.new
response.status = 200
@@ -24,7 +24,7 @@
%w{post put}.each do |request_method|
it "should call do request with method #{request_method.upcase} with a file attachment" do
- session = Webrat::MerbSession.new
+ session = Webrat::MerbAdapter.new
response = OpenStruct.new
response.status = 200
@@ -43,7 +43,7 @@
context "a session with a response" do
before do
- @session = Webrat::MerbSession.new
+ @session = Webrat::MerbAdapter.new
@response = OpenStruct.new
@response.status = 200
@response.body = 'test response'

0 comments on commit 9866824

Please sign in to comment.