Skip to content

Commit

Permalink
Breadcrumbs/Configuration: Add automatic breadcrumbs types editablilt…
Browse files Browse the repository at this point in the history
…y test
  • Loading branch information
Cawllec committed Dec 7, 2018
1 parent c6ab908 commit bfecfe0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bfecfe0

Please sign in to comment.