Sha256: 797efee91671c713b0d9cfbaa0f6cfc744a9a3aa019d73a3229b4d9ceb5ea050
Contents?: true
Size: 799 Bytes
Versions: 1
Compression:
Stored size: 799 Bytes
Contents
module CheckSpec shared_examples_for "check" do describe "#check" do before do @session.visit('/form') end it "should check a checkbox by id" do @session.check("form_pets_cat") @session.click_button('awesome') extract_results(@session)['pets'].should include('dog', 'cat', 'hamster') end it "should check a checkbox by label" do @session.check("Cat") @session.click_button('awesome') extract_results(@session)['pets'].should include('dog', 'cat', 'hamster') end context "with a locator that doesn't exist" do it "should raise an error" do running { @session.check('does not exist') }.should raise_error(Capybara::ElementNotFound) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara-0.3.0 | spec/dsl/check_spec.rb |