Skip to content

Commit

Permalink
Merge pull request #14 from dmathieu/master
Browse files Browse the repository at this point in the history
Set the server's environment to test
  • Loading branch information
netzpirat committed Nov 22, 2011
2 parents b7412b3 + e54178f commit 2013cff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/guard/jasmine/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def start_rack_server(port)

::Guard::UI.info "Guard::Jasmine starts Rack test server on port #{ port }."

self.thread = Thread.new { Rack::Server.start(:config => 'config.ru', :Port => port, :AccessLog => []) }
self.thread = Thread.new {
ENV['RAILS_ENV'] = 'test'
Rack::Server.start(:config => 'config.ru', :Port => port, :AccessLog => [], :environment => 'test')
}

rescue Exception => e
::Guard::UI.error "Cannot start Rack server: #{ e.message }"
Expand Down

0 comments on commit 2013cff

Please sign in to comment.