Sha256: 3fd374e32fe4d62716c3dc3135956c37a292869f0f45f07c798f868e7832c5f0

Contents?: true

Size: 988 Bytes

Versions: 12

Compression:

Stored size: 988 Bytes

Contents

require 'rubygems'
require 'spec'
require 'base64'
require 'fileutils'
require File.expand_path(File.dirname(__FILE__) + "/rspec_extensions")
require File.expand_path(File.dirname(__FILE__) + "/reporting/selenium_test_report_formatter")

Spec::Runner.configure do |config|

  config.prepend_after(:each) do
    begin 
      if actual_failure?
        Selenium::RSpec::SeleniumTestReportFormatter.capture_system_state(selenium_driver, self)
      end
      if selenium_driver.session_started?
        selenium_driver.set_context "Ending example '#{self.description}'"
      end
    rescue Exception => e
      STDERR.puts "Problem while capturing system state" + e
    end
  end

  config.append_before(:each) do
    begin 
      if selenium_driver && selenium_driver.session_started?
        selenium_driver.set_context "Starting example '#{self.description}'"
      end
    rescue Exception => e
      STDERR.puts "Problem while setting context on example start" + e
    end
  end

end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
selenium-selenese-1.1.13 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.12 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.11 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.10 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.6 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.4 lib/selenium/rspec/spec_helper.rb
selenium-selenese-1.1.3 lib/selenium/rspec/spec_helper.rb
warnold-selenium-client-1.2.19 lib/selenium/rspec/spec_helper.rb
selenium-client-1.2.18 lib/selenium/rspec/spec_helper.rb
selenium-client-1.2.17 lib/selenium/rspec/spec_helper.rb
selenium-client-1.2.16 lib/selenium/rspec/spec_helper.rb
selenium-client-1.2.15 lib/selenium/rspec/spec_helper.rb