Sha256: e7eec3900c08f32aa95d0a4dfdc412a04d6a2fabd57fa9005aada405d38da99a

Contents?: true

Size: 1012 Bytes

Versions: 50

Compression:

Stored size: 1012 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

require "webrat/selenium/silence_stream"
require "webrat/selenium/selenium_session"

describe Webrat::SeleniumSession do

  before :each do
    Webrat.configuration.mode = :selenium
    @selenium = Webrat::SeleniumSession.new()
  end

  it "should throw timeout instead of spec expectionnotmet error" do
    lambda {
      @selenium.wait_for(:timeout => 0.0001) do
        raise ::Spec::Expectations::ExpectationNotMetError
      end
    }.should raise_error(Webrat::TimeoutError)
  end

  it "should throw timeout instead of selenium command error" do
    lambda {
      @selenium.wait_for(:timeout => 0.0001) do
        raise ::Selenium::CommandError
      end
    }.should raise_error(Webrat::TimeoutError)
  end

  it "should throw timeout instead of webrat error" do
    lambda {
      @selenium.wait_for(:timeout => 0.0001) do
        raise Webrat::WebratError.new
      end
    }.should raise_error(Webrat::TimeoutError)
  end

end

Version data entries

50 entries across 50 versions & 21 rubygems

Version Path
metry-2.1.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-2.1.1 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-2.0.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-2.0.1 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-2.0.2 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-2.0.3 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-1.0.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-1.0.1 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-1.1.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
metry-1.2.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb