Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update the application server factory to allow use of the RailsUnicor…

…n app server.
  • Loading branch information...
commit cd548efc90fffcbd5f93938a3fcdeeb588a8897e 1 parent ef7c834
Justin Wienckowski authored
3  lib/webrat/selenium/application_server_factory.rb
View
@@ -14,6 +14,9 @@ def self.app_server_instance
when :rails
require "webrat/selenium/application_servers/rails"
return Webrat::Selenium::ApplicationServers::Rails.new
+ when :rails_unicorn
+ require "webrat/selenium/application_servers/rails_unicorn"
+ return Webrat::Selenium::ApplicationServers::RailsUnicorn.new
when :rack
require "webrat/selenium/application_servers/rack"
return Webrat::Selenium::ApplicationServers::Rack.new
8 spec/public/selenium/application_server_factory_spec.rb
View
@@ -31,6 +31,14 @@
Webrat::Selenium::ApplicationServerFactory.app_server_instance
end
+ it "should require and create a rails unicorn server in rails_unicorn mode" do
+ server = mock(Webrat::Selenium::ApplicationServers::RailsUnicorn)
+ Webrat.configuration.application_framework = :rails_unicorn
+ Webrat::Selenium::ApplicationServerFactory.should_receive(:require).with("webrat/selenium/application_servers/rails_unicorn")
+ Webrat::Selenium::ApplicationServers::RailsUnicorn.should_receive(:new).and_return(server)
+ Webrat::Selenium::ApplicationServerFactory.app_server_instance
+ end
+
it "should require and create a rails server in external mode" do
server = mock(Webrat::Selenium::ApplicationServers::External)
Webrat.configuration.application_framework = :external
Please sign in to comment.
Something went wrong with that request. Please try again.