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 culerity driver' do
|
2010-02-25 19:14:58 -05:00
|
|
|
before(:all) do
|
2009-11-16 16:02:16 -05:00
|
|
|
@session = Capybara::Session.new(:culerity, TestApp)
|
2009-11-07 14:44:45 -05:00
|
|
|
end
|
2009-12-12 07:33:00 -05:00
|
|
|
|
2009-11-07 14:44:45 -05:00
|
|
|
describe '#driver' do
|
|
|
|
it "should be a rack test driver" do
|
2009-12-18 13:33:36 -05:00
|
|
|
@session.driver.should be_an_instance_of(Capybara::Driver::Culerity)
|
2009-11-07 14:44:45 -05:00
|
|
|
end
|
|
|
|
end
|
2009-12-12 07:33:00 -05:00
|
|
|
|
2009-11-07 14:44:45 -05:00
|
|
|
describe '#mode' do
|
|
|
|
it "should remember the mode" do
|
|
|
|
@session.mode.should == :culerity
|
|
|
|
end
|
|
|
|
end
|
2009-12-12 07:33:00 -05:00
|
|
|
|
2009-11-07 14:44:45 -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 with headers support"
|
2009-11-07 14:44:45 -05:00
|
|
|
end
|
|
|
|
end
|