2009-11-07 14:44:45 -05:00
|
|
|
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|
|
|
|
2009-11-16 16:02:16 -05:00
|
|
|
describe Capybara::Session do
|
2009-11-07 14:44:45 -05:00
|
|
|
context 'with rack test driver' do
|
|
|
|
before do
|
2009-11-16 16:02:16 -05:00
|
|
|
@session = Capybara::Session.new(:rack_test, TestApp)
|
2009-11-07 14:44:45 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
describe '#driver' do
|
|
|
|
it "should be a rack test driver" do
|
2009-11-16 16:02:16 -05:00
|
|
|
@session.driver.should be_an_instance_of(Capybara::Driver::RackTest)
|
2009-11-07 14:44:45 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#mode' do
|
|
|
|
it "should remember the mode" do
|
|
|
|
@session.mode.should == :rack_test
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it_should_behave_like "session"
|
|
|
|
end
|
|
|
|
end
|