diff --git a/features/rails_features/active_job.feature b/features/rails_features/active_job.feature index 34547574..cbab118b 100644 --- a/features/rails_features/active_job.feature +++ b/features/rails_features/active_job.feature @@ -24,7 +24,7 @@ Scenario: A handled error will be delivered And in Rails versions ">=" 5 the event "metaData.active_job.provider_job_id" matches "^[0-9a-f-]{36}$" And in Rails versions ">=" 5 the event "metaData.active_job.executions" equals 1 And in Rails versions ">=" 6 the event "metaData.active_job.timezone" equals "UTC" - And in Rails versions ">=" 6 the event "metaData.active_job.enqueued_at" is a timestamp + And in Rails versions ">=" 6 except 8 the event "metaData.active_job.enqueued_at" is a timestamp @rails4 @rails5 @rails6 @rails7 @rails8 Scenario: An unhandled error will be delivered @@ -50,7 +50,7 @@ Scenario: An unhandled error will be delivered And in Rails versions ">=" 5 the event "metaData.active_job.provider_job_id" matches "^[0-9a-f-]{36}$" And in Rails versions ">=" 5 the event "metaData.active_job.executions" equals 1 And in Rails versions ">=" 6 the event "metaData.active_job.timezone" equals "UTC" - And in Rails versions ">=" 6 the event "metaData.active_job.enqueued_at" is a timestamp + And in Rails versions ">=" 6 except 8 the event "metaData.active_job.enqueued_at" is a timestamp When I discard the oldest error Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier And the event "unhandled" is true @@ -71,4 +71,4 @@ Scenario: An unhandled error will be delivered And in Rails versions ">=" 5 the event "metaData.active_job.provider_job_id" matches "^[0-9a-f-]{36}$" And in Rails versions ">=" 5 the event "metaData.active_job.executions" equals 2 And in Rails versions ">=" 6 the event "metaData.active_job.timezone" equals "UTC" - And in Rails versions ">=" 6 the event "metaData.active_job.enqueued_at" is a timestamp + And in Rails versions ">=" 6 except 8 the event "metaData.active_job.enqueued_at" is a timestamp diff --git a/features/steps/ruby_notifier_steps.rb b/features/steps/ruby_notifier_steps.rb index 7b3113ba..eb0adc05 100644 --- a/features/steps/ruby_notifier_steps.rb +++ b/features/steps/ruby_notifier_steps.rb @@ -176,6 +176,19 @@ end end +Then("in Rails versions {string} {int} except {int} the event {string} is a timestamp") do |operator, version, exception, path| + skip if RAILS_FIXTURE.version_matches('==', exception) + if RAILS_FIXTURE.version_matches?(operator, version) + steps %Q{ + And the event "#{path}" is a timestamp + } + else + steps %Q{ + And the event "#{path}" is null + } + end +end + Then("the event {string} matches the current Que version") do |path| # append a '.' to make this assertion stricter, e.g. if QUE_VERSION is '1' # we'll use '1.'