From 25136ab22e0c328923c9e81091a3afd32fe4b382 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 06:33:18 +0000 Subject: [PATCH 1/2] build(deps-dev): update rubocop-minitest requirement Updates the requirements on [rubocop-minitest](https://github.com/rubocop/rubocop-minitest) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop-minitest/releases) - [Changelog](https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-minitest/compare/v0.32.2...v0.33.0) --- updated-dependencies: - dependency-name: rubocop-minitest dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index db985594459..65180fd4a3f 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ group :development do # rubocop if Gem::Requirement.new("~> 3.0").satisfied_by?(Gem::Version.new(RUBY_VERSION)) gem "rubocop", "1.57.1" - gem "rubocop-minitest", "0.32.2" + gem "rubocop-minitest", "0.33.0" gem "rubocop-packaging", "0.5.2" gem "rubocop-performance", "1.19.1" gem "rubocop-rake", "= 0.6.0" From 98326be4e06383f7e0c3673c5e6a56a85a12551f Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sun, 29 Oct 2023 13:36:10 -0400 Subject: [PATCH 2/2] style(rubocop): Minitest/AssertEqual and Minitest/RefuteEqual --- test/xml/test_node.rb | 2 +- test/xml/test_node_set.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb index cc483062284..b044c0a73b7 100644 --- a/test/xml/test_node.rb +++ b/test/xml/test_node.rb @@ -1511,7 +1511,7 @@ def test_serialize_unparented_node if Nokogiri.uses_libxml? doc = Nokogiri::XML(xml, &:nobig_lines) node = doc.at_css("x") - assert_operator(node.line, :==, max_short_int) + assert_equal(node.line, max_short_int) end doc = Nokogiri::XML(xml) diff --git a/test/xml/test_node_set.rb b/test/xml/test_node_set.rb index 0f76bcefdfd..6e424a4bb35 100644 --- a/test/xml/test_node_set.rb +++ b/test/xml/test_node_set.rb @@ -284,22 +284,22 @@ def awesome(ns) assert(node_set_one = xml.xpath("//employee")) assert(node_set_two = xml.xpath("//employee")) - refute_operator(node_set_one.object_id, :==, node_set_two.object_id) + refute_equal(node_set_one.object_id, node_set_two.object_id) refute_same(node_set_one, node_set_two) - assert_operator(node_set_one, :==, node_set_two) + assert_operator(node_set_one, :==, node_set_two) # rubocop:disable Minitest/AssertEqual end it "handles comparison to a string" do node_set_one = xml.xpath("//employee") - refute_operator(node_set_one, :==, "asdfadsf") + refute_operator(node_set_one, :==, "asdfadsf") # rubocop:disable Minitest/RefuteEqual end it "returns false if same elements are out of order" do one = xml.xpath("//employee") two = xml.xpath("//employee") two.push(two.shift) - refute_operator(one, :==, two) + refute_operator(one, :==, two) # rubocop:disable Minitest/RefuteEqual end it "returns false if one is a subset of the other" do @@ -307,8 +307,8 @@ def awesome(ns) node_set_two = xml.xpath("//employee") node_set_two.delete(node_set_two.first) - refute_operator(node_set_one, :==, node_set_two) - refute_operator(node_set_two, :==, node_set_one) + refute_operator(node_set_one, :==, node_set_two) # rubocop:disable Minitest/RefuteEqual + refute_operator(node_set_two, :==, node_set_one) # rubocop:disable Minitest/RefuteEqual end end