Skip to content

Commit

Permalink
- Use Kernel.warn directly in expectations in case CUT defines their …
Browse files Browse the repository at this point in the history
…own warn. (firien)

[git-p4: depot-paths = "//src/minitest/dev/": change = 13278]
  • Loading branch information
zenspider committed Dec 5, 2021
1 parent a320274 commit 118c495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/minitest/spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def infect_an_assertion meth, new_name, dont_flip = false # :nodoc:
def #{new_name} *args
where = Minitest.filter_backtrace(caller).first
where = where.split(/:in /, 2).first # clean up noise
warn "DEPRECATED: global use of #{new_name} from #\{where}. Use _(obj).#{new_name} instead. This will fail in Minitest 6."
Kernel.warn "DEPRECATED: global use of #{new_name} from #\{where}. Use _(obj).#{new_name} instead. This will fail in Minitest 6."
Minitest::Expectation.new(self, Minitest::Spec.current).#{new_name}(*args)
end
EOM
Expand Down

0 comments on commit 118c495

Please sign in to comment.