Sha256: 89f099e951545b2b0ab840d652728ccad11c428c35cb524788cafa8ef9acb1a5

Contents?: true

Size: 888 Bytes

Versions: 7

Compression:

Stored size: 888 Bytes

Contents

require 'spec_helper'

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
page-object-1.2.0 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page-object-1.1.1 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page_object-1.1.3 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page_object-1.1.2 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page_object-1.1.1 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page-object-1.1.0 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb
page-object-1.0.3 spec/page-object/platforms/watir_webdriver/watir_page_object_spec.rb