Sha256: c0f50131ed1d82f961421b8f3348b70ecf8c8101a1fdf38b015913188a404f98
Contents?: true
Size: 1.62 KB
Versions: 12
Compression:
Stored size: 1.62 KB
Contents
require 'spec_helper' describe Symbiont::Generators do let(:watir_browser) { mock_browser_for_watir } let(:watir_definition) { DefinitionTest.new(watir_browser) } context "a definition using watir-webdriver" do describe "providing a url" do it "should navigate to the page when viewed" do watir_browser.should_receive(:goto) watir_definition.view end it "should navigate to the page when started" do watir_browser.should_receive(:goto) watir_definition.start end end describe "providing a page title" do it "should specify and verify the page title" do watir_browser.should_receive(:title).and_return("Title of Page") watir_definition.should have_title end it "should raise an error if the page title is not verified" do watir_browser.should_receive(:title).twice.and_return("Incorrect Title") expect { watir_definition.has_title? }.to raise_error end end describe "providing a page object" do it "should specify and verify an expected object" do watir_definition.should_receive(:testPage_object).and_return(watir_browser) watir_browser.should_receive(:when_actionable).with(5).and_return(watir_browser) watir_definition.has_object? end it "should raise an error if the page object is not verified" do class QuickDefinition include Symbiont look_for :fakeLink end QuickDefinition.new(watir_browser).should_not have_object end end end end
Version data entries
12 entries across 12 versions & 1 rubygems