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/has_button_spec.rb
Jonas Nicklas cf1aa4d073 Moved shared specs into lib directory
This way, implementations of other drivers can
use the specs to verify that they are working
correctly.
2010-04-09 16:41:35 +02:00

32 lines
796 B
Ruby

shared_examples_for "has_button" do
describe '#has_button?' do
before do
@session.visit('/form')
end
it "should be true if the given button is on the page" do
@session.should have_button('med')
@session.should have_button('crap321')
end
it "should be false if the given button is not on the page" do
@session.should_not have_button('monkey')
end
end
describe '#has_no_button?' do
before do
@session.visit('/form')
end
it "should be true if the given button is on the page" do
@session.should_not have_no_button('med')
@session.should_not have_no_button('crap321')
end
it "should be false if the given button is not on the page" do
@session.should have_no_button('monkey')
end
end
end