Sha256: 61f74d98e04ff3782316272b4a0eb1a126be729337643eb6f80f49b04a0fb1d7
Contents?: true
Size: 878 Bytes
Versions: 69
Compression:
Stored size: 878 Bytes
Contents
require 'spec_helper' require 'rollbar/truncation' describe Rollbar::Truncation do describe '.truncate' do let(:payload) { {} } context 'if truncation is not needed' do it 'only calls RawStrategy is truncation is not needed' do allow(described_class).to receive(:truncate?).and_return(false) expect(Rollbar::Truncation::RawStrategy).to receive(:call).with(payload) Rollbar::Truncation.truncate(payload) end end context 'if truncation is needed' do it 'calls the next strategy, FramesStrategy' do allow(described_class).to receive(:truncate?).and_return(true, false) expect(Rollbar::Truncation::RawStrategy).to receive(:call).with(payload) expect(Rollbar::Truncation::FramesStrategy).to receive(:call).with(payload) Rollbar::Truncation.truncate(payload) end end end end
Version data entries
69 entries across 69 versions & 1 rubygems