Permalink
Browse files

Move app to a let in the middleware spec

  • Loading branch information...
1 parent 81a6577 commit 9a680b7ff0eba0e0e28f08e6d242a6f7f5ee17a4 @jnunemaker committed Feb 19, 2013
Showing with 12 additions and 14 deletions.
  1. +12 −14 spec/flipper-ui/middleware_spec.rb
View
26 spec/flipper-ui/middleware_spec.rb
@@ -13,20 +13,18 @@
Flipper.new(adapter, :instrumenter => ActiveSupport::Notifications)
}
- def app
- @app ||= begin
- middleware = described_class
- instance = flipper
-
- Rack::Builder.new do
- use middleware, instance
-
- map "/" do
- run lambda {|env| [404, {}, []] }
- end
- end.to_app
- end
- end
+ let(:app) {
+ middleware = described_class
+ instance = flipper
+
+ Rack::Builder.new do
+ use middleware, instance
+
+ map "/" do
+ run lambda {|env| [404, {}, []] }
+ end
+ end.to_app
+ }
describe "GET /flipper" do
before do

0 comments on commit 9a680b7

Please sign in to comment.