Sha256: 4c7157e8a21fd79c403140dce486e9962cc7215bc31affafdba2f5d92f8163e8

Contents?: true

Size: 566 Bytes

Versions: 3

Compression:

Stored size: 566 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")

Webrat.configure do |config|
  config.mode = :selenium
end

class Spec::Rails::Example::SeleniumExampleGroup
  before(:suite) do
    FileUtils.cd("#{RAILS_ROOT}") do
      system("mongrel_rails mongrel::start -p 3001 -e test -d")
    end
    Timeout.timeout(10) do
      loop do
        begin
          TCPSocket.new("localhost", "3001")
        rescue => e
          retry
        end
        break
      end
    end
  end

  after(:suite) do
    system("mongrel_rails mongrel::stop")
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
pivotal-webrat-rspec-rails-0.1.1 spec/rails_root/spec/selenium/selenium_spec_helper.rb
honkster-webrat-rspec-rails-0.1.1 spec/rails_root/spec/selenium/selenium_spec_helper.rb
webrat-rspec-rails-0.1.1 spec/rails_root/spec/selenium/selenium_spec_helper.rb