spec/pilfer/middleware_spec.rb in pilfer-0.0.1.pre4 vs spec/pilfer/middleware_spec.rb in pilfer-1.0.0

- old
+ new

@@ -10,11 +10,12 @@ let(:guard) { Proc.new do true end } subject { Pilfer::Middleware.new(app, options, &guard) } it 'profiles and calls the downstream app' do app.should_receive(:call).with(env).once - profiler.should_receive(:profile).with(no_args).and_yield + profiler.should_receive(:profile). + with("GET /", :submit => :async).and_yield subject.call(env) end it 'passes rack env to guard' do guard_args = nil @@ -31,11 +32,11 @@ let(:options) {{ :file_matcher => file_matcher, :profiler => profiler }} it 'passes file matcher to profiler and calls the downstream app' do app.should_receive(:call).with(env).once - profiler.should_receive(:profile_files_matching).with(file_matcher). - and_yield + profiler.should_receive(:profile_files_matching). + with(file_matcher, "GET /", :submit => :async).and_yield subject.call(env) end end context 'when guard returns false' do