mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
16 lines
421 B
Ruby
16 lines
421 B
Ruby
shared_examples_for "find_button" do
|
|
describe '#find_button' do
|
|
before do
|
|
@session.visit('/form')
|
|
end
|
|
|
|
it "should find any field" do
|
|
@session.find_button('med')[:id].should == "mediocre"
|
|
@session.find_button('crap321').value.should == "crappy"
|
|
end
|
|
|
|
it "should return nil if the field doesn't exist" do
|
|
@session.find_button('Does not exist').should be_nil
|
|
end
|
|
end
|
|
end
|