brew/Library/Homebrew/test/rubocops/conflicts_spec.rb
Claudia 5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00

28 lines
910 B
Ruby

require "rubocops/conflicts"
describe RuboCop::Cop::FormulaAudit::Conflicts do
subject(:cop) { described_class.new }
context "When auditing formula for conflicts with" do
it "multiple conflicts_with" do
expect_offense(<<~RUBY, "/homebrew-core/Formula/foo@2.0.rb")
class FooAT20 < Formula
url 'https://brew.sh/foo-2.0.tgz'
conflicts_with "mysql", "mariadb", "percona-server",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Versioned formulae should not use `conflicts_with`. Use `keg_only :versioned_formula` instead.
:because => "both install plugins"
end
RUBY
end
it "no conflicts_with" do
expect_no_offenses(<<~RUBY, "/homebrew-core/Formula/foo@2.0.rb")
class FooAT20 < Formula
url 'https://brew.sh/foo-2.0.tgz'
desc 'Bar'
end
RUBY
end
end
end