spec/pilfer/middleware_spec.rb in pilfer-1.0.0 vs spec/pilfer/middleware_spec.rb in pilfer-1.0.1
- old
+ new
@@ -51,6 +51,16 @@
it 'skips profiling' do
profiler.should_not_receive(:profile)
subject.call(env)
end
end
+
+ context 'with no guard' do
+ subject { Pilfer::Middleware.new(app, options) }
+
+ it 'profiles and calls the downstream app' do
+ profiler.should_receive(:profile).and_yield
+ app.should_receive(:call).with(env)
+ subject.call(env)
+ end
+ end
end