mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
cf1aa4d073
This way, implementations of other drivers can use the specs to verify that they are working correctly.
19 lines
574 B
Ruby
19 lines
574 B
Ruby
shared_examples_for "session with headers support" do
|
|
describe '#response_headers' do
|
|
it "should return response headers" do
|
|
@session.visit('/with_simple_html')
|
|
@session.response_headers['Content-Type'].should == 'text/html'
|
|
end
|
|
end
|
|
end
|
|
|
|
shared_examples_for "session without headers support" do
|
|
describe "#response_headers" do
|
|
before{ @session.visit('/with_simple_html') }
|
|
it "should raise an error" do
|
|
running {
|
|
@session.response_headers
|
|
}.should raise_error(Capybara::NotSupportedByDriverError)
|
|
end
|
|
end
|
|
end
|