Sha256: 65110ac3909dc97550923fd9a32f3aa769c2e48f8abf6a1b83e1aac6e2826652

Contents?: true

Size: 814 Bytes

Versions: 8

Compression:

Stored size: 814 Bytes

Contents

# encoding: utf-8
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

if ENV['coverage']
  raise "simplecov only works on Ruby 1.9" unless RUBY_VERSION =~ /^1\.9/

  require 'simplecov'
  SimpleCov.start { add_filter "spec/" }
end

require 'rspec'
require 'watir-webdriver'
require 'selenium-webdriver'

require 'page-object'

def mock_watir_browser
  watir_browser = double('watir')
  watir_browser.should_receive(:is_a?).with(Watir::Browser).and_return(true)
  watir_browser
end

      
def mock_selenium_browser
  selenium_browser = double('selenium')
  selenium_browser.should_receive(:is_a?).with(Watir::Browser).and_return(false)
  selenium_browser.should_receive(:is_a?).with(Selenium::WebDriver::Driver).and_return(true)
  selenium_browser
end
  

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
page-object-0.2 spec/spec_helper.rb
page-object-0.1.1 spec/spec_helper.rb
page-object-0.1 spec/spec_helper.rb
page-object-0.0.5 spec/spec_helper.rb
page-object-0.0.4 spec/spec_helper.rb
page-object-0.0.3 spec/spec_helper.rb
page-object-0.0.2 spec/spec_helper.rb
page-object-0.0.1 spec/spec_helper.rb