Skip to content

Commit

Permalink
Silence mocha deprecations (#886)
Browse files Browse the repository at this point in the history
* Add warning gem

* Silence Mocha warnings

Deprecation warnings are incorrect because there is a misunderstanding
around the Ruby keyword arguments change in 3.0.

Ref: freerange/mocha#593

Close #876
  • Loading branch information
techguru321 committed Oct 29, 2023
1 parent fec6b3c commit b9e9a13
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :development do
gem 'rails-controller-testing'
gem 'simplecov', require: false
gem 'simplecov-cobertura'
gem 'warning'
end

group :rubocop do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
warning (1.3.0)
webrick (1.8.1)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand All @@ -278,6 +279,7 @@ DEPENDENCIES
rubocop-performance
simplecov
simplecov-cobertura
warning

BUNDLED WITH
2.4.8
1 change: 1 addition & 0 deletions gemfiles/rails_61/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ group :development do
gem 'rails-controller-testing'
gem 'simplecov', require: false
gem 'simplecov-cobertura'
gem 'warning'
end
2 changes: 2 additions & 0 deletions gemfiles/rails_61/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ GEM
timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
warning (1.3.0)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-driver (0.7.6-java)
Expand All @@ -210,6 +211,7 @@ DEPENDENCIES
rails-controller-testing
simplecov
simplecov-cobertura
warning

BUNDLED WITH
2.4.8
1 change: 1 addition & 0 deletions gemfiles/rails_70/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ group :development do
gem 'rails-controller-testing'
gem 'simplecov', require: false
gem 'simplecov-cobertura'
gem 'warning'
end
2 changes: 2 additions & 0 deletions gemfiles/rails_70/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ GEM
timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
warning (1.3.0)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-driver (0.7.6-java)
Expand All @@ -209,6 +210,7 @@ DEPENDENCIES
rails-controller-testing
simplecov
simplecov-cobertura
warning

BUNDLED WITH
2.4.8
4 changes: 4 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
require "active_model"
require "action_controller"

# TODO: Remove warning gem and the following lines when freerange/mocha#593 will be fixed
require "warning"
Warning.ignore(/Mocha deprecation warning .+ expected keyword arguments .+ but received positional hash/)

require 'rails-controller-testing'
Rails::Controller::Testing.install

Expand Down

0 comments on commit b9e9a13

Please sign in to comment.