From bfecfe0137c3011a8ab7a9b75acd2d1ebd7d2464 Mon Sep 17 00:00:00 2001 From: Alex Moinet Date: Fri, 7 Dec 2018 11:15:16 +0000 Subject: [PATCH] Breadcrumbs/Configuration: Add automatic breadcrumbs types editablilty test --- spec/configuration_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index ecd003b27..15bd82c03 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -247,7 +247,6 @@ def debug(name, &block) expect(buffer.to_a).to eq([1]) expect(second_buffer.to_a).to eq([2]) - expect(buffer).to_not eq(second_buffer) end it "sets max_items to the current max_breadcrumbs size" do @@ -282,6 +281,11 @@ def debug(name, &block) it "defaults to Bugsnag::Breadcrumbs::VALID_BREADCRUMB_TYPES" do expect(subject.automatic_breadcrumb_types).to eq(Bugsnag::Breadcrumbs::VALID_BREADCRUMB_TYPES) end + + it "is an editable array" do + subject.automatic_breadcrumb_types << "Some custom type" + expect(subject.automatic_breadcrumb_types).to include("Some custom type") + end end describe "#before_breadcrumb_callbacks" do @@ -305,7 +309,6 @@ def debug(name, &block) second_array = nil Thread.new { second_array = subject.before_breadcrumb_callbacks; second_array << 2}.join - expect(first_array).to eql(second_array) expect(first_array).to eq([1, 2]) expect(second_array).to eq([1, 2]) end