Make the test expect_offense calls consistent with other tests
This commit is contained in:
parent
f4754baa00
commit
f34accfcde
@ -1,11 +1,10 @@
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "rubocops/rubocop-cask"
|
||||
|
||||
describe RuboCop::Cop::Cask::ArrayAlphabetization, :config do
|
||||
it "reports an offense when a single `zap trash` path is specified in an array" do
|
||||
source = <<~CASK
|
||||
expect_offense(<<~CASK)
|
||||
cask "foo" do
|
||||
url "https://example.com/foo.zip"
|
||||
|
||||
@ -14,7 +13,6 @@ describe RuboCop::Cop::Cask::ArrayAlphabetization, :config do
|
||||
end
|
||||
CASK
|
||||
|
||||
expect_offense(source)
|
||||
expect_correction(<<~CASK)
|
||||
cask "foo" do
|
||||
url "https://example.com/foo.zip"
|
||||
@ -25,7 +23,7 @@ describe RuboCop::Cop::Cask::ArrayAlphabetization, :config do
|
||||
end
|
||||
|
||||
it "reports an offense when the `zap trash` paths are not in alphabetical order" do
|
||||
source = <<~CASK
|
||||
expect_offense(<<~CASK)
|
||||
cask "foo" do
|
||||
url "https://example.com/foo.zip"
|
||||
|
||||
@ -41,7 +39,6 @@ describe RuboCop::Cop::Cask::ArrayAlphabetization, :config do
|
||||
end
|
||||
CASK
|
||||
|
||||
expect_offense(source)
|
||||
expect_correction(<<~CASK)
|
||||
cask "foo" do
|
||||
url "https://example.com/foo.zip"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user