Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ActiveJob tests for Rails 7.2 and 8.0 #2487

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry-rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gem "rails", "~> #{rails_version}"

if rails_version >= Gem::Version.new("8.0.0")
gem "rspec-rails"
gem "sqlite3", platform: :ruby
gem "sqlite3", "~> 2.1.1", platform: :ruby
elsif rails_version >= Gem::Version.new("7.1.0")
gem "rspec-rails"
gem "sqlite3", "~> 1.7.3", platform: :ruby
Expand Down
4 changes: 2 additions & 2 deletions sentry-rails/spec/sentry/rails/activejob_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FailedJobWithCron < FailedJob
end


RSpec.describe "without Sentry initialized" do
RSpec.describe "without Sentry initialized", type: :job do
it "runs job" do
expect { FailedJob.perform_now }.to raise_error(FailedJob::TestError)
end
Expand All @@ -78,7 +78,7 @@ class FailedJobWithCron < FailedJob
end
end

RSpec.describe "ActiveJob integration" do
RSpec.describe "ActiveJob integration", type: :job do
before do
make_basic_app
end
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 @@ -56,6 +56,8 @@
ENV.delete('RAILS_ENV')
ENV.delete('RACK_ENV')
end

config.include ActiveJob::TestHelper, type: :job
end

def reload_send_event_job
Expand Down
Loading