brew/Library/Homebrew/test/cmd/uses_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

26 lines
691 B
Ruby

describe "brew uses", :integration_test do
it "prints the Formulae a given Formula is used by" do
setup_test_formula "foo"
setup_test_formula "bar"
setup_test_formula "baz", <<~RUBY
url "https://brew.sh/baz-1.0"
depends_on "bar"
RUBY
expect { brew "uses", "baz" }
.to be_a_success
.and not_to_output.to_stdout
.and not_to_output.to_stderr
expect { brew "uses", "bar" }
.to output("baz\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
expect { brew "uses", "--recursive", "foo" }
.to output(/(bar\nbaz|baz\nbar)/).to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
end