Sha256: 09adfabbb36da5879172f084fcf6592aca21e85fa7d6c0b7c45121650f17afcf

Contents?: true

Size: 1.33 KB

Versions: 9

Compression:

Stored size: 1.33 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 :rack
          require "webrat/selenium/application_servers/rack"
          return Webrat::Selenium::ApplicationServers::Rack.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

9 entries across 9 versions & 5 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/lib/webrat/selenium/application_server_factory.rb
indirect-webrat-0.7.5 lib/webrat/selenium/application_server_factory.rb
indirect-webrat-0.7.4 lib/webrat/selenium/application_server_factory.rb
webrat-0.7.3 lib/webrat/selenium/application_server_factory.rb
jbd-webrat-0.7.2.rails3 lib/webrat/selenium/application_server_factory.rb
webrat-0.7.2 lib/webrat/selenium/application_server_factory.rb
webrat-0.7.2.beta.2 lib/webrat/selenium/application_server_factory.rb
mutle-webrat-0.7.2.beta.1 lib/webrat/selenium/application_server_factory.rb
webrat-0.7.2.beta.1 lib/webrat/selenium/application_server_factory.rb