Sha256: ddf83e528f57b275fd972063464baf08de1427c8d2a9da532e546f29a3934ff0

Contents?: true

Size: 483 Bytes

Versions: 42

Compression:

Stored size: 483 Bytes

Contents

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 raise error if the field doesn't exist" do
      running do
        @session.find_button('Does not exist')
      end.should raise_error(Capybara::ElementNotFound)
    end
  end
end

Version data entries

42 entries across 42 versions & 9 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/capybara-1.1.4/lib/capybara/spec/session/find_button_spec.rb
capybara-1.1.4 lib/capybara/spec/session/find_button_spec.rb
capybara-1.1.3 lib/capybara/spec/session/find_button_spec.rb
capybara-2.0.0.beta2 lib/capybara/spec/session/find_button_spec.rb
nimboids-capybara-1.1.2 lib/capybara/spec/session/find_button_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
capybara_minitest_spec-0.2.2 test_app/session/find_button_spec.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/capybara-1.1.2/lib/capybara/spec/session/find_button_spec.rb
bbc-capybara-1.1.2 lib/capybara/spec/session/find_button_spec.rb
capybara_minitest_spec-0.2.1.1 test_app/session/find_button_spec.rb
capybara-1.1.2 lib/capybara/spec/session/find_button_spec.rb
capybara_minitest_spec-0.2.1 test_app/session/find_button_spec.rb