Sha256: b177e12882a522d9acb876f4f2aa35cba765c01cc071c3be9a6c3271f774c423
Contents?: true
Size: 770 Bytes
Versions: 1
Compression:
Stored size: 770 Bytes
Contents
module FindFieldSpec shared_examples_for "find_field" do describe '#find_field' do before do @session.visit('/form') end it "should find any field" do @session.find_field('Dog').value.should == 'dog' @session.find_field('form_description').text.should == 'Descriptive text goes here' @session.find_field('Region')[:name].should == 'form[region]' end it "should be nil if the field doesn't exist" do @session.find_field('Does not exist').should be_nil end it "should be aliased as 'field_labeled' for webrat compatibility" do @session.field_labeled('Dog').value.should == 'dog' @session.field_labeled('Does not exist').should be_nil end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara-0.3.0 | spec/dsl/find_field_spec.rb |