spec/lib/appsignal/transaction_spec.rb in appsignal-0.9.6 vs spec/lib/appsignal/transaction_spec.rb in appsignal-0.10.0.beta.0

- old
+ new

@@ -232,20 +232,11 @@ subject.truncate! subject.process_action_event.payload.should be_empty subject.events.should be_empty subject.tags.should be_empty - subject.truncated?.should be_true end - - it "should not truncate twice" do - subject.process_action_event.payload.should_receive(:clear).once - subject.events.should_receive(:clear).once - - subject.truncate! - subject.truncate! - end end describe "#convert_values_to_primitives!" do let(:transaction) { slow_transaction } let(:action_event_payload) { transaction.process_action_event.payload } @@ -289,18 +280,10 @@ it " doesn't change the event payloads" do before = event_payload.dup subject event_payload.should == before end - - it "should not covert to primitives twice" do - transaction.convert_values_to_primitives! - transaction.have_values_been_converted_to_primitives?.should be_true - - Appsignal::Transaction::ParamsSanitizer.should_not_receive(:sanitize!) - transaction.convert_values_to_primitives! - end end end describe "#type" do context "with a regular transaction" do @@ -370,21 +353,13 @@ after { transaction.complete! } end context 'when using pipes' do let(:pipe) { double } - before do - Appsignal::Pipe.stub(:current => pipe) - pipe.stub(:write => true) - transaction.stub(:convert_values_to_primitives! => true) - end + before { Appsignal::Pipe.stub(:current => pipe) } it "should send itself trough the pipe" do pipe.should_receive(:write).with(transaction) - end - - it "should convert itself to primitives" do - transaction.should_receive(:convert_values_to_primitives!) end after { transaction.complete! } end end