Skip to content

Commit

Permalink
rename Minitest::Hooks to Minitest::Test
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Apr 25, 2024
1 parent 6d4d739 commit 713b933
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/datadog/ci/contrib/minitest/patcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_relative "runner"
require_relative "reporter"
require_relative "hooks"
require_relative "test"
require_relative "runnable"

module Datadog
Expand All @@ -25,7 +25,7 @@ def patch
# test suites (when not executed concurrently)
::Minitest::Runnable.include(Runnable)
# tests; test suites (when executed concurrently)
::Minitest::Test.include(Hooks)
::Minitest::Test.include(Test)
# test session finish
::Minitest::CompositeReporter.include(Reporter)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module CI
module Contrib
module Minitest
# Lifecycle hooks to instrument Minitest::Test
module Hooks
module Test
def self.included(base)
base.prepend(InstanceMethods)
base.singleton_class.prepend(ClassMethods)
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/ci/contrib/minitest/patcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
context "Minitest::Test is patched" do
let(:test) { Minitest::Test }
it "has a custom bases" do
expect(test.ancestors).to include(Datadog::CI::Contrib::Minitest::Hooks)
expect(test.ancestors).to include(Datadog::CI::Contrib::Minitest::Test)
end
end

Expand Down

0 comments on commit 713b933

Please sign in to comment.