Skip to content

Commit

Permalink
Fix spec for old rails
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Mar 10, 2025
1 parent d155a1b commit d19050a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sentry-rails/spec/sentry/rails/activejob_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def perform(event, hint)
end
end

describe "active_job_report_after_job_retries", skip: Rails.version.to_f < 5.1 do
describe "active_job_report_after_job_retries", skip: RAILS_VERSION < 7.0 do
context "when active_job_report_after_job_retries is false" do
it "reports 3 exceptions" do
allow(Sentry::Rails::ActiveJobExtensions::SentryReporter)
Expand Down
2 changes: 2 additions & 0 deletions sentry-rails/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

Dir["#{__dir__}/support/**/*.rb"].each { |file| require file }

RAILS_VERSION = Rails.version.to_f

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = ".rspec_status"
Expand Down

0 comments on commit d19050a

Please sign in to comment.