Sha256: 3cbdd69198f951488e671506cc695fd11eea4ce833bb76f4f5a97d3f9aecdb71

Contents?: true

Size: 796 Bytes

Versions: 54

Compression:

Stored size: 796 Bytes

Contents

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

Version data entries

54 entries across 54 versions & 14 rubygems

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