Skip to content

Commit

Permalink
Rename MechanizeSession to MechanizeAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Aug 13, 2009
1 parent 89ec303 commit e4ea913
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/webrat/core/session.rb
Expand Up @@ -34,7 +34,7 @@ def self.adapter_class
when :selenium
SeleniumSession
when :mechanize
MechanizeSession
MechanizeAdapter
else
raise WebratError.new(<<-STR)
Unknown Webrat mode: #{Webrat.configuration.mode.inspect}
Expand Down
2 changes: 1 addition & 1 deletion lib/webrat/mechanize.rb
@@ -1,7 +1,7 @@
require "mechanize"

module Webrat #:nodoc:
class MechanizeSession < Session #:nodoc:
class MechanizeAdapter < Session #:nodoc:

attr_accessor :response
alias :page :response
Expand Down
Expand Up @@ -2,13 +2,13 @@

require "webrat/mechanize"

describe Webrat::MechanizeSession do
describe Webrat::MechanizeAdapter do
before :each do
Webrat.configuration.mode = :mechanize
end

before(:each) do
@mech = Webrat::MechanizeSession.new
@mech = Webrat::MechanizeAdapter.new
end

describe "headers method" do
Expand All @@ -34,13 +34,13 @@ def flattened_data
mechanize = mock(:mechanize)
WWW::Mechanize.stub!(:new => mechanize)
mechanize.should_receive(:post).with(url, flattened_data)
Webrat::MechanizeSession.new.post(url, data)
Webrat::MechanizeAdapter.new.post(url, data)
end
end

describe "#absolute_url" do
before(:each) do
@session = Webrat::MechanizeSession.new
@session = Webrat::MechanizeAdapter.new
@session.stub!(:current_url).and_return(absolute_url)
end

Expand Down

0 comments on commit e4ea913

Please sign in to comment.