1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/spec/session/response_code.rb
Gareth Townsend d1fc4d6e1a Rename response_code to status_code for consistency.
Update selenium specs to ensure that it raises the Capybara::NotSupportedByDriverError error.
2010-06-07 13:14:40 +10:00

19 lines
536 B
Ruby

shared_examples_for "session with status code support" do
describe '#status_code' do
it "should return response codes" do
@session.visit('/with_simple_html')
@session.status_code.should == 200
end
end
end
shared_examples_for "session without status code support" do
describe "#status_code" do
before{ @session.visit('/with_simple_html') }
it "should raise an error" do
running {
@session.status_code
}.should raise_error(Capybara::NotSupportedByDriverError)
end
end
end