Skip to content

Commit

Permalink
Fix minitest deprecation warning
Browse files Browse the repository at this point in the history
It seems that Minitest 6 will no longer support this idiom: `assert_equal nil, obj`:

> DEPRECATED: Use assert_nil if expecting nil from /Users/etagwerker/Projects/fastruby/coverband/test/coverband/collectors/route_tracker_test.rb:23. This will fail in Minitest 6.

So this fixes that problem and makes it easier to upgrade to Minitest 6.
  • Loading branch information
etagwerker committed Mar 28, 2023
1 parent 114d4a6 commit 2d1cd23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/coverband/collectors/route_tracker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setup
test "init correctly" do
Coverband::Collectors::RouteTracker.expects(:supported_version?).returns(true)
tracker = Coverband::Collectors::RouteTracker.new(store: fake_store, roots: "dir")
assert_equal nil, tracker.target.first
assert_nil tracker.target.first
assert !tracker.store.nil?
assert_equal [], tracker.target
assert_equal [], tracker.logged_keys
Expand Down
2 changes: 1 addition & 1 deletion test/coverband/collectors/translation_tracker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setup
test "init correctly" do
Coverband::Collectors::TranslationTracker.expects(:supported_version?).returns(true)
tracker = Coverband::Collectors::TranslationTracker.new(store: fake_store, roots: "dir")
assert_equal nil, tracker.target.first
assert_nil tracker.target.first
assert !tracker.store.nil?
assert_equal [], tracker.target
assert_equal [], tracker.logged_keys
Expand Down

0 comments on commit 2d1cd23

Please sign in to comment.