brew/Library/Homebrew/test/cask/cmd/home_spec.rb
Alec Clarke 45806f6a97 Include test casks in the cask style check.
Currently the tests casks found in "/Homebrew/test/support/fixtures/cask/Casks" and "/Homebrew/test/support/fixtures/third-party/Casks" aren't included in the paths checked when running "brew cask style".

This change includes these test cask paths in the checked paths, and also includes the auto style fixes made by running `brew cask style --fix`.
2019-09-23 08:50:24 -04:00

28 lines
845 B
Ruby

# frozen_string_literal: true
require_relative "shared_examples/invalid_option"
describe Cask::Cmd::Home, :cask do
before do
allow(described_class).to receive(:open_url)
end
it_behaves_like "a command that handles invalid options"
it "opens the homepage for the specified Cask" do
expect(described_class).to receive(:open_url).with("https://brew.sh/")
described_class.run("local-caffeine")
end
it "works for multiple Casks" do
expect(described_class).to receive(:open_url).with("https://brew.sh/")
expect(described_class).to receive(:open_url).with("https://brew.sh/")
described_class.run("local-caffeine", "local-transmission")
end
it "opens the project page when no Cask is specified" do
expect(described_class).to receive(:open_url).with("https://brew.sh/")
described_class.run
end
end