2009-11-14 04:44:46 -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-14 04:44:46 -05:00
|
|
|
context 'with selenium driver' do
|
|
|
|
before do
|
2009-11-16 16:02:16 -05:00
|
|
|
@session = Capybara::Session.new(:selenium, TestApp)
|
2009-11-14 04:44:46 -05:00
|
|
|
end
|
2009-12-11 16:40:23 -05:00
|
|
|
|
2009-11-14 04:44:46 -05:00
|
|
|
describe '#driver' do
|
2009-12-11 16:40:23 -05:00
|
|
|
it "should be a selenium driver" do
|
2009-11-16 16:02:16 -05:00
|
|
|
@session.driver.should be_an_instance_of(Capybara::Driver::Selenium)
|
2009-11-14 04:44:46 -05:00
|
|
|
end
|
|
|
|
end
|
2009-12-11 16:40:23 -05:00
|
|
|
|
2009-11-14 04:44:46 -05:00
|
|
|
describe '#mode' do
|
|
|
|
it "should remember the mode" do
|
|
|
|
@session.mode.should == :selenium
|
|
|
|
end
|
|
|
|
end
|
2009-12-11 16:40:23 -05:00
|
|
|
|
2009-11-14 04:44:46 -05:00
|
|
|
it_should_behave_like "session"
|
2009-12-09 15:43:40 -05:00
|
|
|
it_should_behave_like "session with javascript support"
|
2009-12-18 13:33:36 -05:00
|
|
|
it_should_behave_like "session without headers support"
|
2009-11-14 04:44:46 -05:00
|
|
|
end
|
|
|
|
end
|