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
diabolo-webrat-0.5.1 spec/public/selenium/selenium_session_spec.rb
dstrelau-webrat-0.5.1 spec/public/selenium/selenium_session_spec.rb
emipair-webrat-0.0.1 spec/public/selenium/selenium_session_spec.rb
hardbap-webrat-0.5.1 spec/public/selenium/selenium_session_spec.rb
hardbap-webrat-0.5.2 spec/public/selenium/selenium_session_spec.rb
winton-sum-0.1.0 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
winton-sum-0.1.1 vendor/webrat/spec/public/selenium/selenium_session_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/public/selenium/selenium_session_spec.rb
indirect-webrat-0.7.5 spec/public/selenium/selenium_session_spec.rb
indirect-webrat-0.7.4 spec/public/selenium/selenium_session_spec.rb
webrat-0.7.3 spec/public/selenium/selenium_session_spec.rb
jbd-webrat-0.7.2.rails3 spec/public/selenium/selenium_session_spec.rb
webrat-0.7.2 spec/public/selenium/selenium_session_spec.rb
webrat-0.7.2.beta.2 spec/public/selenium/selenium_session_spec.rb
mutle-webrat-0.7.2.beta.1 spec/public/selenium/selenium_session_spec.rb
thoughtbot-webrat-0.7.2.pre spec/public/selenium/selenium_session_spec.rb
webrat-0.7.2.beta.1 spec/public/selenium/selenium_session_spec.rb
revo-webrat-0.7.0.1 spec/public/selenium/selenium_session_spec.rb
webrat-0.7.1 spec/public/selenium/selenium_session_spec.rb
davidtrogers-webrat-0.7.0 spec/public/selenium/selenium_session_spec.rb