Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Merge commit 'sr/sinatra' into sr_sinatra
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Mar 8, 2009
2 parents 5dc24c6 + 90baf33 commit d1a2c80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
11 changes: 1 addition & 10 deletions lib/webrat/sinatra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ class SinatraSession < RackSession
def initialize(context = nil)
super(context)

app =
if context.respond_to?(:app)
context.app
else
Sinatra::Application.tap { |app|
app.set :environment, :test
app.disable :run, :reload
}
end

app = context.respond_to?(:app) ? context.app : Sinatra::Application
@browser = Sinatra::TestHarness.new(app)
end

Expand Down
5 changes: 1 addition & 4 deletions spec/integration/sinatra/test/modular_app_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@

class MyModularAppTest < Test::Unit::TestCase
def app
MyModularApp.tap { |app|
app.disable :run, :reload
app.set :environment, :test
}
MyModularApp
end

def test_it_works
Expand Down

0 comments on commit d1a2c80

Please sign in to comment.