test/rubocops/text: update assert tests

This commit is contained in:
Nanda H Krishna 2025-02-18 10:51:37 -05:00
parent cf0b00a05c
commit 1f9cc89926
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA

View File

@ -23,7 +23,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::AssertStatements do
desc "foo"
url 'https://brew.sh/foo-1.0.tgz'
assert File.exist? "default.ini"
^^^^^^^^^^^^^^^^^^^^^^^^^ FormulaAudit/AssertStatements: Use `assert_predicate <path_to_file>, :exist?` instead of `assert File.exist? "default.ini"`
^^^^^^^^^^^^^^^^^^^^^^^^^ FormulaAudit/AssertStatements: Use `assert_path_exists <path_to_file>` instead of `assert File.exist? "default.ini"`
end
RUBY
end
@ -34,7 +34,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::AssertStatements do
desc "foo"
url 'https://brew.sh/foo-1.0.tgz'
assert !File.exist?("default.ini")
^^^^^^^^^^^^^^^^^^^^^^^^^^^ FormulaAudit/AssertStatements: Use `refute_predicate <path_to_file>, :exist?` instead of `assert !File.exist?("default.ini")`
^^^^^^^^^^^^^^^^^^^^^^^^^^^ FormulaAudit/AssertStatements: Use `refute_path_exists <path_to_file>` instead of `assert !File.exist?("default.ini")`
end
RUBY
end