Sha256: 52228e8004eb8cdec6a29f09e4413a6418764c946e874c84158cc336bdf1c578

Contents?: true

Size: 952 Bytes

Versions: 4

Compression:

Stored size: 952 Bytes

Contents

require 'selenium-connect/configuration'
require 'selenium-connect/runners/phantomjs'
require 'selenium-webdriver'

describe "phantomjs runner" do
  it "should match against phantomjs if configured as such" do
    config = SeleniumConnect::Configuration.new
    config.browser = 'phantomjs'
    runner = SeleniumConnect::Runner::PhantomJS.new(config)
    runner.match?.should be_true
  end

  it "should not match if there is a different browser specified" do
    config = SeleniumConnect::Configuration.new
    config.browser = 'chrome'
    runner = SeleniumConnect::Runner::PhantomJS.new(config)
    runner.match?.should be_false
  end

  it "should return a browser capabilities object for the browser on launch" do
    config = SeleniumConnect::Configuration.new
    config.browser = 'phantomjs'
    runner = SeleniumConnect::Runner::PhantomJS.new(config)
    runner.launch.is_a?(Selenium::WebDriver::Remote::Capabilities).should be true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
selenium-connect-2.0.0 spec/runners/phantomjs_spec.rb
selenium-connect-1.9.3 spec/runners/phantomjs_spec.rb
selenium-connect-1.9.1 spec/runners/phantomjs_spec.rb
selenium-connect-1.9.0 spec/runners/phantomjs_spec.rb