Sha256: ad5ab56f2a44738437ea7222662e593fbd6d8df9b471270fe34b4757437ee18d

Contents?: true

Size: 1.01 KB

Versions: 16

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

describe PageObject::Platforms::WatirWebDriver do
  
  it "should be in the PageObjects Adapters list" do
    PageObject::Platforms.get[:watir_webdriver].should be PageObject::Platforms::WatirWebDriver
  end
  
  describe "create page object" do
    let(:browser) { double('browser') }
    let(:subject) { PageObject::Platforms::WatirWebDriver.create_page_object(browser) }
    
    it "should create a WatirPageObject" do
      subject.should be_kind_of PageObject::Platforms::WatirWebDriver::PageObject
    end
    
    it "should give the watir page object the browser" do
      subject.browser.should be browser
    end
  end
  
  describe "is for?" do
    it "should be true when the browser is Watir::Browser" do
      browser = mock_watir_browser()
      PageObject::Platforms::WatirWebDriver.is_for?(browser).should be true
    end
    
    it "should be false at any other point" do
      browser = 'asdf'
      PageObject::Platforms::WatirWebDriver.is_for?('asdf').should be false
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
page-object-0.8.1 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.8 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.6 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.5.1 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.5 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.4 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.3 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.2 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.1 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.7.0 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.9 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.8 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.7 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.6 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.5 spec/page-object/platforms/watir_webdriver_spec.rb
page-object-0.6.4 spec/page-object/platforms/watir_webdriver_spec.rb