use application_environment in merb also
This commit is contained in:
parent
4fb9406154
commit
92565d3bc4
|
@ -41,7 +41,7 @@ module Webrat
|
|||
exec 'rackup', File.expand_path(Dir.pwd + '/config.ru'), '-p', Webrat.configuration.application_port.to_s
|
||||
end
|
||||
when :merb
|
||||
system("merb -d -p #{Webrat.configuration.application_port}")
|
||||
system("merb -d -p #{Webrat.configuration.application_port} -e #{Webrat.configuration.application_environment}")
|
||||
else # rails
|
||||
system("mongrel_rails start -d --chdir='#{RAILS_ROOT}' --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &")
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ describe Webrat, "Selenium" do
|
|||
describe "merb" do
|
||||
it "should start the app server with correct config options" do
|
||||
Webrat.configuration.application_framework = :merb
|
||||
Webrat.should_receive(:system).with("merb -d -p #{Webrat.configuration.application_port}")
|
||||
Webrat.should_receive(:system).with("merb -d -p #{Webrat.configuration.application_port} -e #{Webrat.configuration.application_environment}")
|
||||
TCPSocket.should_receive(:wait_for_service).with(:host => Webrat.configuration.application_address, :port => Webrat.configuration.application_port.to_i)
|
||||
Webrat.start_app_server
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue