Skip to content

Commit

Permalink
Upgrade mocha to fix test failures against minitest 5.19 (#147)
Browse files Browse the repository at this point in the history
This fixes the following test failure:

> gems/mocha-1.16.1/lib/mocha/integration/mini_test/adapter.rb:26:in 'included': uninitialized constant MiniTest (NameError)
Did you mean?  Minitest
  • Loading branch information
mattbrictson committed Aug 8, 2023
1 parent dfedbe0 commit 68efb8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if RUBY_VERSION == "1.9.3"
# These gems need specific version for Ruby 1.9
gem "json", "~> 1.8"
gem "minitest", "~> 5.11.3"
gem "mocha", "~> 1.2"
gem "net-ssh", "~> 2.8"
gem "rake", "< 12.3"
gem "term-ansicolor", "~> 1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion airbrussh.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "minitest", "~> 5.10"
spec.add_development_dependency "minitest-reporters", "~> 1.1"
spec.add_development_dependency "mocha", "~> 1.2"
spec.add_development_dependency "mocha", "~> 2.1"
end
6 changes: 4 additions & 2 deletions test/support/mocha.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require "mocha/minitest"

Mocha::Configuration.warn_when(:stubbing_non_existent_method)
Mocha::Configuration.warn_when(:stubbing_non_public_method)
Mocha.configure do |c|
c.stubbing_non_existent_method = :warn
c.stubbing_non_public_method = :warn
end

0 comments on commit 68efb8a

Please sign in to comment.