Sha256: fe6141867997b81a64f7ee9e0e553737e6724210a8db845b0ae219838b6765c1

Contents?: true

Size: 952 Bytes

Versions: 7

Compression:

Stored size: 952 Bytes

Contents

require 'spec_helper'


describe PageObject::Platforms::SeleniumWebDriver do

  it "should be registered as an adapter" do
    expect(PageObject::Platforms.get[:selenium_webdriver]).to be PageObject::Platforms::SeleniumWebDriver
  end
  
  describe 'create page object' do
    let(:browser) { double('browser') }
    let(:subject) { PageObject::Platforms::SeleniumWebDriver.create_page_object(browser) }
    
    it "should create a SeleniumPageObject" do
      expect(subject).to be_kind_of PageObject::Platforms::SeleniumWebDriver::PageObject
    end
  end
  
  describe "is for?" do
    it "should be true when the browser is a selenium driver" do
      browser = mock_selenium_browser()
      expect(PageObject::Platforms::SeleniumWebDriver.is_for?(browser)).to eql true
    end
    
    it "should be false when the browser is anything else" do
      expect(PageObject::Platforms::SeleniumWebDriver.is_for?("asdf")).to eql 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/selenium_webdriver_spec.rb
page-object-1.1.1 spec/page-object/platforms/selenium_webdriver_spec.rb
page_object-1.1.3 spec/page-object/platforms/selenium_webdriver_spec.rb
page_object-1.1.2 spec/page-object/platforms/selenium_webdriver_spec.rb
page_object-1.1.1 spec/page-object/platforms/selenium_webdriver_spec.rb
page-object-1.1.0 spec/page-object/platforms/selenium_webdriver_spec.rb
page-object-1.0.3 spec/page-object/platforms/selenium_webdriver_spec.rb