spec/bullet/rack_spec.rb in bullet-4.14.4 vs spec/bullet/rack_spec.rb in bullet-4.14.5

- old
+ new

@@ -63,11 +63,11 @@ _, _, response = middleware.call([]) expect(response).to eq(expected_response) end it "should change response body if notification is active" do - expect(Bullet).to receive(:notification?).and_return(true).twice + expect(Bullet).to receive(:notification?).and_return(true) expect(Bullet).to receive(:gather_inline_notifications).and_return("<bullet></bullet>") expect(Bullet).to receive(:perform_out_of_channel_notifications) status, headers, response = middleware.call([200, {"Content-Type" => "text/html"}]) expect(headers["Content-Length"]).to eq("56") expect(response).to eq(["<html><head></head><body><bullet></bullet></body></html>"]) @@ -75,10 +75,10 @@ it "should set the right Content-Length if response body contains accents" do response = Support::ResponseDouble.new response.body = "<html><head></head><body>é</body></html>" app.response = response - expect(Bullet).to receive(:notification?).and_return(true).twice + expect(Bullet).to receive(:notification?).and_return(true) expect(Bullet).to receive(:gather_inline_notifications).and_return("<bullet></bullet>") status, headers, response = middleware.call([200, {"Content-Type" => "text/html"}]) expect(headers["Content-Length"]).to eq("58") end end