spec/outputs/airbrake_spec.rb in logstash-output-airbrake-0.1.0 vs spec/outputs/airbrake_spec.rb in logstash-output-airbrake-0.2.0

- old
+ new

@@ -23,10 +23,11 @@ } } before do allow(Airbrake).to receive(:configure) + allow(subject).to receive(:send_notice) subject.register end describe "#register" do @@ -38,18 +39,16 @@ expect(Airbrake).to have_received(:configure).once end end describe "#receive" do - let(:event) { LogStash::Event.new("foo" => "bar") } + let(:event) { LogStash::Event.new("message" => "bar") } before do - allow(Airbrake).to receive(:notify) - subject.receive(event) end it "should forward the event to Airbrake" do - expect(Airbrake).to have_received(:notify).once + expect(subject).to have_received(:send_notice).once end end end