Skip to content

Commit 085ca30

Browse files
committed
Sets the rack environment to 'test'
This extra setting is used by Sinatra's environment helpers. Without it, rspec will run your tests with ENV['RACK_ENV'] = 'development'
1 parent dff786d commit 085ca30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

testing/rspec.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ require 'rack/test'
1414

1515
require File.expand_path '../../my-app.rb', __FILE__
1616

17+
ENV['RACK_ENV'] = 'test'
18+
1719
module RSpecMixin
1820
include Rack::Test::Methods
1921
def app() Sinatra::Application end

0 commit comments

Comments
 (0)