Skip to content

Commit

Permalink
Require debugger in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Sep 17, 2021
1 parent fddb235 commit 644c5e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sentry-rails/spec/sentry/rails/tracing_spec.rb
Expand Up @@ -21,6 +21,7 @@
expect(described_class).to receive(:subscribe_tracing_events).and_call_original

make_basic_app do |config|
config.breadcrumbs_logger = [:active_support_logger]
config.traces_sample_rate = 1.0
end
end
Expand Down Expand Up @@ -87,6 +88,18 @@
expect(last_span[:description]).to eq("PostsController#show")
expect(last_span[:parent_span_id]).to eq(parent_span_id)
end

it "doesn't add internal start timestamp payload to breadcrumbs data" do
p = Post.create!

get "/posts/#{p.id}"

expect(transport.events.count).to eq(1)

transaction = transport.events.last.to_hash
breadcrumbs = transaction[:breadcrumbs][:values]
expect(breadcrumbs.last[:data].has_key?(described_class::START_TIMESTAMP_NAME)).to eq(false)
end
end

context "with sprockets-rails" do
Expand Down
1 change: 1 addition & 0 deletions sentry-rails/spec/spec_helper.rb
@@ -1,4 +1,5 @@
require "bundler/setup"
require "debug"
require "pry"

require "sentry-ruby"
Expand Down

0 comments on commit 644c5e7

Please sign in to comment.