Skip to content

Commit

Permalink
Fix compatibility with Minitest 5.19+ (#289)
Browse files Browse the repository at this point in the history
The `MiniTest` was renamed to `Minitest`:

minitest/minitest@9a57c52

And the `MiniTest` constant is now loaded just when `MT_COMPAT` environment variable is set:

minitest/minitest@a2c6c18
  • Loading branch information
voxik authored Aug 5, 2023
1 parent 175eab1 commit 75b972e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/fog/test_helpers/minitest/assertions.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "fog/schema/data_validator"

module MiniTest::Assertions
module Minitest::Assertions
# Compares a hash's structure against a reference schema hash and returns true
# when they match. Fog::Schema::Datavalidator is used for the validation.
def assert_match_schema(actual, schema, message = nil, options = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/test_helpers/minitest/expectations.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MiniTest::Expectations
module Minitest::Expectations
infect_an_assertion :assert_match_schema, :must_match_schema, :reverse
end
2 changes: 1 addition & 1 deletion spec/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Mock; def initialize(*_args); end; end

describe "when config object can configure the service itself" do
it "ignores the global and its values" do
@config = MiniTest::Mock.new
@config = Minitest::Mock.new
def @config.config_service?; true; end
def @config.nil?; false; end
def @config.==(other); object_id == other.object_id; end
Expand Down

0 comments on commit 75b972e

Please sign in to comment.