Skip to content

Commit

Permalink
Update tests for recent ruby ecosystem changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Jan 10, 2025
1 parent ced743e commit 0151738
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
optional-groups: ['test sidekiq']
include:
- ruby-version: '1.9'
os: 'ubuntu-20.04'
optional-groups: 'test'
- ruby-version: '2.0'
optional-groups: 'test'
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/apps/rails-initializer-config/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ source 'https://rubygems.org'

ruby_version = Gem::Version.new(RUBY_VERSION.dup)

gem 'mutex_m', 0.3.0 if ruby_version >= Gem::Version.new('3.4')

gem 'railties', ruby_version <= Gem::Version.new('2.6') ? '4.2.10' : '~> 6.0.2', require: %w(action_controller rails)
gem 'rake', ruby_version <= Gem::Version.new('1.9.3') ? '~> 11.3.0' : '~> 12.3.0'
gem 'minitest', ruby_version <= Gem::Version.new('2.2') ? '5.11.3' : '~> 5.14.0'
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/apps/rails-invalid-initializer-config/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ source 'https://rubygems.org'

ruby_version = Gem::Version.new(RUBY_VERSION.dup)

gem 'mutex_m', 0.3.0 if ruby_version >= Gem::Version.new('3.4')

gem 'railties', ruby_version <= Gem::Version.new('2.6') ? '4.2.10' : '~> 6.0.2', require: %w(action_controller rails)
gem 'rake', ruby_version <= Gem::Version.new('1.9.3') ? '~> 11.3.0' : '~> 12.3.0'
gem 'minitest', ruby_version <= Gem::Version.new('2.2') ? '5.11.3' : '~> 5.14.0'
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/apps/rails-no-config/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ source 'https://rubygems.org'

ruby_version = Gem::Version.new(RUBY_VERSION.dup)

gem 'mutex_m', 0.3.0 if ruby_version >= Gem::Version.new('3.4')

gem 'railties', ruby_version <= Gem::Version.new('2.6') ? '4.2.10' : '~> 6.0.2', require: %w(action_controller rails)
gem 'rake', ruby_version <= Gem::Version.new('1.9.3') ? '~> 11.3.0' : '~> 12.3.0'
gem 'minitest', ruby_version <= Gem::Version.new('2.2') ? '5.11.3' : '~> 5.14.0'
Expand Down
6 changes: 5 additions & 1 deletion spec/report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2089,9 +2089,13 @@ def to_s

it "works with java.lang.Throwables" do
begin
pp "I'm failing!"
JRubyException.raise!
rescue
pp "I've failed"
rescue => e
pp "I'm notifying! #{e.message}"
Bugsnag.notify $!
pp "I've notified!"
end

expect(Bugsnag).to have_sent_notification{ |payload, headers|
Expand Down

0 comments on commit 0151738

Please sign in to comment.