Permalink
Browse files

Allow for setting options and reuse of the mock app.

  • Loading branch information...
piotrmurach committed Jul 7, 2012
1 parent 55745a7 commit badc9f75cd55d874d1d0d32532590dd608336141
Showing with 2 additions and 3 deletions.
  1. +2 −3 spec/spec_helper.rb
View
@@ -19,12 +19,11 @@ def app
@app || mock_app(DummyApp)
end
- def mock_app(app=nil, &block)
+ def mock_app(app=nil, opts={}, &block)
app = block if app.nil? and block.arity == 1
if app
- klass = described_class
mock_app do
- use klass
+ use Rack::Policy::CookieLimiter, opts
run app
end
else

0 comments on commit badc9f7

Please sign in to comment.