From 2568aea6eaaa4f2ffd23bf9bf9e48212100635b9 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 18 Aug 2021 15:21:08 +0530 Subject: [PATCH] Fix RuboCop offenses in tests --- test/test_document.rb | 2 +- test/test_utils.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_document.rb b/test/test_document.rb index 108f55cc..e980b1f5 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -39,7 +39,7 @@ class TestDocument < JekyllUnitTest end should "exist" do - refute @document.nil? + refute_nil @document end should "know its relative path" do diff --git a/test/test_utils.rb b/test/test_utils.rb index 40549aa8..969ffaa1 100644 --- a/test/test_utils.rb +++ b/test/test_utils.rb @@ -130,7 +130,7 @@ class TestUtils < JekyllUnitTest context "The \`Utils.slugify\` method" do should "return nil if passed nil" do - assert Utils.slugify(nil).nil? + assert_nil Utils.slugify(nil) rescue NoMethodError assert false, "Threw NoMethodError" end