Sha256: a8a05e3f283b71f38f518e03a2a87a30c835dc995b2262488f02dbc121ae088c

Contents?: true

Size: 1.19 KB

Versions: 15

Compression:

Stored size: 1.19 KB

Contents

require "simplecov"

SimpleCov.start do
  SimpleCov.root "#{Dir.pwd}/../../../"
  command_name 'RSpec Integration'
  use_merging true
  merge_timeout 6000
end

require "rspec"
require "sauce"

def page_deprecation_warning
  return <<-MESSAGE
[DEPRECATED] Using the #page method is deprecated for RSpec tests without Capybara.  Please use the #s or #selenium method instead.
If you are using Capybara and are seeing this message, check the Capybara README for information on how to include the Capybara DSL in your tests.
  MESSAGE
end

shared_examples_for "an integrated spec" do

  before :all do
    $TAGGED_EXECUTIONS = 0
  end

  after :all do
    $TAGGED_EXECUTIONS.should eq 2
  end

  context "When calling the #page method" do
    it "should get access to the Webdriver object" do
      page.should be_a_kind_of Sauce::Selenium2
    end

    it "should output a deprecation message" do
      self.should_receive(:warn).with(page_deprecation_warning).and_call_original
      page
    end
  end

  it "should be using Sauce Connect" do
    Sauce::Utilities::Connect.instance_variable_get(:@tunnel).should_not be_nil
  end

  it "should get run on every defined browser" do
    $TAGGED_EXECUTIONS += 1
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sauce-3.5.4 spec/integration/rspec/spec/spec_helper.rb
sauce-3.5.3 spec/integration/rspec/spec/spec_helper.rb
sauce-3.5.2 spec/integration/rspec/spec/spec_helper.rb
sauce-3.5.1 spec/integration/rspec/spec/spec_helper.rb
sauce-3.5.0 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.9 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.8 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.7 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.6 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.5 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.4 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.3 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.2 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.1 spec/integration/rspec/spec/spec_helper.rb
sauce-3.4.0 spec/integration/rspec/spec/spec_helper.rb