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/find_link_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

17 lines
425 B
Ruby

shared_examples_for "find_link" do
describe '#find_link' do
before do
@session.visit('/with_html')
end
it "should find any field" do
@session.find_link('foo').text.should == "ullamco"
@session.find_link('labore')[:href].should == "/with_simple_html"
end
it "should return nil if the field doesn't exist" do
@session.find_link('Does not exist').should be_nil
end
end
end