From 1b4cf23dd5fb1f07004c28bd44e38a3dad3426b9 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Thu, 14 May 2015 17:01:13 +0100 Subject: Simplify InfoRequestEvent#is_incoming_message? Just check if there's an associated InfoRequest. user system total real old 0.010000 0.000000 0.010000 ( 0.012269) new 0.000000 0.000000 0.000000 ( 0.000101) --- spec/models/info_request_event_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/models/info_request_event_spec.rb') diff --git a/spec/models/info_request_event_spec.rb b/spec/models/info_request_event_spec.rb index ff20ab059..17c6a5004 100644 --- a/spec/models/info_request_event_spec.rb +++ b/spec/models/info_request_event_spec.rb @@ -111,8 +111,7 @@ describe InfoRequestEvent do describe "should know" do it "that it's an incoming message" do - event = InfoRequestEvent.new - event.stub!(:incoming_message_selective_columns).and_return(1) + event = InfoRequestEvent.new(:incoming_message => mock_model(IncomingMessage)) event.is_incoming_message?.should be_true event.is_outgoing_message?.should be_false event.is_comment?.should be_false -- cgit v1.2.3