Sha256: be345fadc844b927a0ed4f9dc969156b73bcd7cedb2abfe1740ff581ab308b8f

Contents?: true

Size: 1.19 KB

Versions: 47

Compression:

Stored size: 1.19 KB

Contents

module Webrat
  module Selenium

    class ApplicationServerFactory

      def self.app_server_instance
        case Webrat.configuration.application_framework
        when :sinatra
          require "webrat/selenium/application_servers/sinatra"
          return Webrat::Selenium::ApplicationServers::Sinatra.new
        when :merb
          require "webrat/selenium/application_servers/merb"
          return Webrat::Selenium::ApplicationServers::Merb.new
        when :rails
          require "webrat/selenium/application_servers/rails"
          return Webrat::Selenium::ApplicationServers::Rails.new
        when :external
          require "webrat/selenium/application_servers/external"
          return Webrat::Selenium::ApplicationServers::External.new
        else
          raise WebratError.new(<<-STR)
Unknown Webrat application_framework: #{Webrat.configuration.application_framework.inspect}

Please ensure you have a Webrat configuration block that specifies an application_framework
in your test_helper.rb, spec_helper.rb, or env.rb (for Cucumber).

For example:

  Webrat.configure do |config|
    # ...
    config.application_framework = :rails
  end
      STR
        end
      end

    end

  end
end

Version data entries

47 entries across 47 versions & 18 rubygems

Version Path
aslakhellesoy-webrat-0.4.4.1 lib/webrat/selenium/application_server_factory.rb
diabolo-webrat-0.5.1 lib/webrat/selenium/application_server_factory.rb
dstrelau-webrat-0.5.1 lib/webrat/selenium/application_server_factory.rb
emipair-webrat-0.0.1 lib/webrat/selenium/application_server_factory.rb
garnierjm-webrat-0.4.5 lib/webrat/selenium/application_server_factory.rb
hardbap-webrat-0.5.1 lib/webrat/selenium/application_server_factory.rb
hardbap-webrat-0.5.2 lib/webrat/selenium/application_server_factory.rb
winton-sum-0.1.0 vendor/webrat/lib/webrat/selenium/application_server_factory.rb
winton-sum-0.1.1 vendor/webrat/lib/webrat/selenium/application_server_factory.rb
thoughtbot-webrat-0.7.2.pre lib/webrat/selenium/application_server_factory.rb
honkster-webrat-0.7.1.2 lib/webrat/selenium/application_server_factory.rb
honkster-webrat-0.7.1.1 lib/webrat/selenium/application_server_factory.rb
revo-webrat-0.7.0.1 lib/webrat/selenium/application_server_factory.rb
webrat-0.7.1 lib/webrat/selenium/application_server_factory.rb
davidtrogers-webrat-0.7.0 lib/webrat/selenium/application_server_factory.rb
revo-webrat-0.7.0 lib/webrat/selenium/application_server_factory.rb
revo-webrat-0.7.1.pre lib/webrat/selenium/application_server_factory.rb
webrat-0.7.0 lib/webrat/selenium/application_server_factory.rb
honkster-webrat-0.6.0.10 lib/webrat/selenium/application_server_factory.rb
honkster-webrat-0.6.0.9 lib/webrat/selenium/application_server_factory.rb