Skip to content

Commit 2fa01fc

Browse files
committed
Fix spec for old rails
1 parent 996c046 commit 2fa01fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sentry-rails/spec/sentry/rails/activejob_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def perform(event, hint)
434434
end
435435
end
436436

437-
describe "active_job_report_after_job_retries", skip: Rails.version.to_f < 5.1 do
437+
describe "active_job_report_after_job_retries", skip: RAILS_VERSION < 7.0 do
438438
context "when active_job_report_after_job_retries is false" do
439439
it "reports 3 exceptions" do
440440
allow(Sentry::Rails::ActiveJobExtensions::SentryReporter)

sentry-rails/spec/spec_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

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

37+
RAILS_VERSION = Rails.version.to_f
38+
3739
RSpec.configure do |config|
3840
# Enable flags like --only-failures and --next-failure
3941
config.example_status_persistence_file_path = ".rspec_status"

0 commit comments

Comments
 (0)