Add :cask to all Cask specs.

This commit is contained in:
Markus Reiter 2017-03-05 19:26:56 +01:00
parent 43bfaa19f1
commit 73cbb9df3b
53 changed files with 54 additions and 133 deletions

View File

@ -1,8 +1,6 @@
require "spec_helper"
# TODO: this test should be named after the corresponding class, once # TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb. # that class is abstracted from installer.rb.
describe "Accessibility Access" do describe "Accessibility Access", :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-accessibility-access.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-accessibility-access.rb") }
let(:fake_system_command) { class_double(Hbc::SystemCommand) } let(:fake_system_command) { class_double(Hbc::SystemCommand) }
let(:installer) { Hbc::Installer.new(cask, command: fake_system_command) } let(:installer) { Hbc::Installer.new(cask, command: fake_system_command) }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::App, :cask do
describe Hbc::Artifact::App do
describe "activate to alternate target" do describe "activate to alternate target" do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-alt-target.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-alt-target.rb") }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::App, :cask do
describe Hbc::Artifact::App do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") }
let(:command) { Hbc::SystemCommand } let(:command) { Hbc::SystemCommand }
let(:force) { false } let(:force) { false }

View File

@ -1,4 +1,4 @@
describe Hbc::Artifact::Binary do describe Hbc::Artifact::Binary, :cask do
let(:cask) { let(:cask) {
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-binary.rb").tap do |cask| Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-binary.rb").tap do |cask|
shutup do shutup do

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::Artifact, :cask do
describe Hbc::Artifact::Artifact do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact.rb") }
let(:install_phase) { let(:install_phase) {

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::NestedContainer, :cask do
describe Hbc::Artifact::NestedContainer do
describe "install" do describe "install" do
it "extracts the specified paths as containers" do it "extracts the specified paths as containers" do
cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c| cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c|

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::Pkg, :cask do
describe Hbc::Artifact::Pkg do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") }
let(:fake_system_command) { class_double(Hbc::SystemCommand) } let(:fake_system_command) { class_double(Hbc::SystemCommand) }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::PostflightBlock, :cask do
describe Hbc::Artifact::PostflightBlock do
describe "install_phase" do describe "install_phase" do
it "calls the specified block after installing, passing a Cask mini-dsl" do it "calls the specified block after installing, passing a Cask mini-dsl" do
called = false called = false

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::PreflightBlock, :cask do
describe Hbc::Artifact::PreflightBlock do
describe "install_phase" do describe "install_phase" do
it "calls the specified block before installing, passing a Cask mini-dsl" do it "calls the specified block before installing, passing a Cask mini-dsl" do
called = false called = false

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::Suite, :cask do
describe Hbc::Artifact::Suite do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-suite.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-suite.rb") }
let(:install_phase) { -> { Hbc::Artifact::Suite.new(cask).install_phase } } let(:install_phase) { -> { Hbc::Artifact::Suite.new(cask).install_phase } }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::App, :cask do
describe Hbc::Artifact::App do
describe "multiple apps" do describe "multiple apps" do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-correct.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-two-apps-correct.rb") }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::App, :cask do
describe Hbc::Artifact::App do
# FIXME: Doesn't actually raise because the `app` stanza is not evaluated on load. # FIXME: Doesn't actually raise because the `app` stanza is not evaluated on load.
# it "must raise" do # it "must raise" do
# lambda { # lambda {

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::Zap, :cask do
describe Hbc::Artifact::Zap do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") }
let(:zap_artifact) { let(:zap_artifact) {

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Artifact::Uninstall, :cask do
describe Hbc::Artifact::Uninstall do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") }
let(:uninstall_artifact) { let(:uninstall_artifact) {

View File

@ -1,7 +1,5 @@
require "spec_helper"
# TODO: test that zap removes an alternate version of the same Cask # TODO: test that zap removes an alternate version of the same Cask
describe Hbc::Artifact::Zap do describe Hbc::Artifact::Zap, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") }
let(:zap_artifact) { let(:zap_artifact) {

View File

@ -1,4 +1,4 @@
describe Hbc::Audit do describe Hbc::Audit, :cask do
def include_msg?(messages, msg) def include_msg?(messages, msg)
if msg.is_a?(Regexp) if msg.is_a?(Regexp)
Array(messages).any? { |m| m =~ msg } Array(messages).any? { |m| m =~ msg }

View File

@ -1,4 +1,4 @@
describe Hbc::Cask do describe Hbc::Cask, :cask do
let(:cask) { described_class.new("versioned-cask") } let(:cask) { described_class.new("versioned-cask") }
context "when multiple versions are installed" do context "when multiple versions are installed" do

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Audit, :cask do
describe Hbc::CLI::Audit do
let(:auditor) { double } let(:auditor) { double }
let(:cask) { double } let(:cask) { double }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Cat, :cask do
describe Hbc::CLI::Cat do
describe "given a basic Cask" do describe "given a basic Cask" do
let(:expected_output) { let(:expected_output) {
<<-EOS.undent <<-EOS.undent

View File

@ -1,4 +1,4 @@
describe Hbc::CLI::Cleanup do describe Hbc::CLI::Cleanup, :cask do
let(:cache_location) { Pathname.new(Dir.mktmpdir).realpath } let(:cache_location) { Pathname.new(Dir.mktmpdir).realpath }
let(:cleanup_outdated) { false } let(:cleanup_outdated) { false }

View File

@ -1,5 +1,3 @@
require "spec_helper"
# monkeypatch for testing # monkeypatch for testing
module Hbc module Hbc
class CLI class CLI
@ -19,7 +17,7 @@ module Hbc
end end
end end
describe Hbc::CLI::Create do describe Hbc::CLI::Create, :cask do
before(:each) do before(:each) do
Hbc::CLI::Create.reset! Hbc::CLI::Create.reset!
end end

View File

@ -1,5 +1,3 @@
require "spec_helper"
# monkeypatch for testing # monkeypatch for testing
module Hbc module Hbc
class CLI class CLI
@ -19,7 +17,7 @@ module Hbc
end end
end end
describe Hbc::CLI::Edit do describe Hbc::CLI::Edit, :cask do
before(:each) do before(:each) do
Hbc::CLI::Edit.reset! Hbc::CLI::Edit.reset!
end end

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Fetch, :cask do
describe Hbc::CLI::Fetch do
let(:local_transmission) { let(:local_transmission) {
Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")
} }

View File

@ -1,5 +1,3 @@
require "spec_helper"
# monkeypatch for testing # monkeypatch for testing
module Hbc module Hbc
class CLI class CLI
@ -19,7 +17,7 @@ module Hbc
end end
end end
describe Hbc::CLI::Home do describe Hbc::CLI::Home, :cask do
before do before do
Hbc::CLI::Home.reset! Hbc::CLI::Home.reset!
end end

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Info, :cask do
describe Hbc::CLI::Info do
it "displays some nice info about the specified Cask" do it "displays some nice info about the specified Cask" do
expect { expect {
Hbc::CLI::Info.run("local-caffeine") Hbc::CLI::Info.run("local-caffeine")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Install, :cask do
describe Hbc::CLI::Install do
it "allows staging and activation of multiple Casks at once" do it "allows staging and activation of multiple Casks at once" do
shutup do shutup do
Hbc::CLI::Install.run("local-transmission", "local-caffeine") Hbc::CLI::Install.run("local-transmission", "local-caffeine")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::List, :cask do
describe Hbc::CLI::List do
it "lists the installed Casks in a pretty fashion" do it "lists the installed Casks in a pretty fashion" do
casks = %w[local-caffeine local-transmission].map { |c| Hbc.load(c) } casks = %w[local-caffeine local-transmission].map { |c| Hbc.load(c) }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI, :cask do
describe Hbc::CLI do
it "supports setting the appdir" do it "supports setting the appdir" do
Hbc::CLI.process_options %w[help --appdir=/some/path/foo] Hbc::CLI.process_options %w[help --appdir=/some/path/foo]

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Reinstall, :cask do
describe Hbc::CLI::Reinstall do
it "allows reinstalling a Cask" do it "allows reinstalling a Cask" do
shutup do shutup do
Hbc::CLI::Install.run("local-transmission") Hbc::CLI::Install.run("local-transmission")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Search, :cask do
describe Hbc::CLI::Search do
it "lists the available Casks that match the search term" do it "lists the available Casks that match the search term" do
expect { expect {
Hbc::CLI::Search.run("local") Hbc::CLI::Search.run("local")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Uninstall, :cask do
describe Hbc::CLI::Uninstall do
it "shows an error when a bad Cask is provided" do it "shows an error when a bad Cask is provided" do
expect { expect {
Hbc::CLI::Uninstall.run("notacask") Hbc::CLI::Uninstall.run("notacask")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe "brew cask --version", :cask do
describe "brew cask --version" do
it "respects the --version argument" do it "respects the --version argument" do
expect { expect {
expect { expect {

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::CLI::Zap, :cask do
describe Hbc::CLI::Zap do
it "shows an error when a bad Cask is provided" do it "shows an error when a bad Cask is provided" do
expect { expect {
Hbc::CLI::Zap.run("notacask") Hbc::CLI::Zap.run("notacask")

View File

@ -1,4 +1,4 @@
describe Hbc::CLI do describe Hbc::CLI, :cask do
it "lists the taps for Casks that show up in two taps" do it "lists the taps for Casks that show up in two taps" do
listing = Hbc::CLI.nice_listing(%w[ listing = Hbc::CLI.nice_listing(%w[
caskroom/cask/adium caskroom/cask/adium

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Container::Dmg, :cask do
describe Hbc::Container::Dmg do
describe "#mount!" do describe "#mount!" do
it "does not store nil mounts for dmgs with extra data" do it "does not store nil mounts for dmgs with extra data" do
transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Container::Naked, :cask do
describe Hbc::Container::Naked do
it "saves files with spaces in them from uris with encoded spaces" do it "saves files with spaces in them from uris with encoded spaces" do
cask = Hbc::Cask.new("spacey") do cask = Hbc::Cask.new("spacey") do
url "http://example.com/kevin%20spacey.pkg" url "http://example.com/kevin%20spacey.pkg"

View File

@ -1,8 +1,6 @@
require "spec_helper"
# TODO: this test should be named after the corresponding class, once # TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb # that class is abstracted from installer.rb
describe "Satisfy Dependencies and Requirements" do describe "Satisfy Dependencies and Requirements", :cask do
subject { subject {
lambda do lambda do
shutup do shutup do

View File

@ -1,4 +1,4 @@
describe "download strategies" do describe "download strategies", :cask do
let(:url) { "http://example.com/cask.dmg" } let(:url) { "http://example.com/cask.dmg" }
let(:url_options) { Hash.new } let(:url_options) { Hash.new }
let(:cask) { let(:cask) {

View File

@ -1,7 +1,6 @@
require "spec_helper"
require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_dsl_base"
describe Hbc::DSL::Caveats do describe Hbc::DSL::Caveats, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:dsl) { Hbc::DSL::Caveats.new(cask) } let(:dsl) { Hbc::DSL::Caveats.new(cask) }

View File

@ -1,8 +1,7 @@
require "spec_helper"
require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_dsl_base"
require "test/support/helper/spec/shared_examples/hbc_staged" require "test/support/helper/spec/shared_examples/hbc_staged"
describe Hbc::DSL::Postflight do describe Hbc::DSL::Postflight, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:dsl) { Hbc::DSL::Postflight.new(cask, Hbc::FakeSystemCommand) } let(:dsl) { Hbc::DSL::Postflight.new(cask, Hbc::FakeSystemCommand) }

View File

@ -1,8 +1,7 @@
require "spec_helper"
require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_dsl_base"
require "test/support/helper/spec/shared_examples/hbc_staged" require "test/support/helper/spec/shared_examples/hbc_staged"
describe Hbc::DSL::Preflight do describe Hbc::DSL::Preflight, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:dsl) { Hbc::DSL::Preflight.new(cask, Hbc::FakeSystemCommand) } let(:dsl) { Hbc::DSL::Preflight.new(cask, Hbc::FakeSystemCommand) }

View File

@ -1,7 +1,6 @@
require "spec_helper"
require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_dsl_base"
describe Hbc::DSL::UninstallPostflight do describe Hbc::DSL::UninstallPostflight, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:dsl) { Hbc::DSL::UninstallPostflight.new(cask, Hbc::FakeSystemCommand) } let(:dsl) { Hbc::DSL::UninstallPostflight.new(cask, Hbc::FakeSystemCommand) }

View File

@ -1,8 +1,7 @@
require "spec_helper"
require "test/support/helper/spec/shared_examples/hbc_dsl_base" require "test/support/helper/spec/shared_examples/hbc_dsl_base"
require "test/support/helper/spec/shared_examples/hbc_staged" require "test/support/helper/spec/shared_examples/hbc_staged"
describe Hbc::DSL::UninstallPreflight do describe Hbc::DSL::UninstallPreflight, :cask do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:dsl) { Hbc::DSL::UninstallPreflight.new(cask, Hbc::FakeSystemCommand) } let(:dsl) { Hbc::DSL::UninstallPreflight.new(cask, Hbc::FakeSystemCommand) }

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::DSL, :cask do
describe Hbc::DSL do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/#{token}.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/#{token}.rb") }
let(:token) { "basic-cask" } let(:token) { "basic-cask" }
@ -76,7 +74,7 @@ describe Hbc::DSL do
end end
end end
context "when it contains a deprecated DSL version" do context "when it contains a deprecated DSL version", :needs_compat do
let(:token) { "with-dsl-version" } let(:token) { "with-dsl-version" }
it "may use deprecated DSL version hash syntax" do it "may use deprecated DSL version hash syntax" do

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Installer, :cask do
describe Hbc::Installer do
describe "install" do describe "install" do
let(:empty_depends_on_stub) { let(:empty_depends_on_stub) {
double(formula: [], cask: [], macos: nil, arch: nil, x11: nil) double(formula: [], cask: [], macos: nil, arch: nil, x11: nil)

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::Pkg, :cask do
describe Hbc::Pkg do
describe "uninstall" do describe "uninstall" do
let(:fake_system_command) { Hbc::NeverSudoSystemCommand } let(:fake_system_command) { Hbc::NeverSudoSystemCommand }
let(:empty_response) { double(stdout: "") } let(:empty_response) { double(stdout: "") }

View File

@ -1,4 +1,4 @@
describe Hbc::Scopes do describe Hbc::Scopes, :cask do
describe "installed" do describe "installed" do
it "returns a list installed Casks by loading Casks for all the dirs that exist in the caskroom" do it "returns a list installed Casks by loading Casks for all the dirs that exist in the caskroom" do
allow(Hbc).to receive(:load) { |token| "loaded-#{token}" } allow(Hbc).to receive(:load) { |token| "loaded-#{token}" }

View File

@ -1,9 +1,7 @@
require "spec_helper"
# TODO: this test should be named after the corresponding class, once # TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb. It makes little sense # that class is abstracted from installer.rb. It makes little sense
# to be invoking bundle_identifier off of the installer instance. # to be invoking bundle_identifier off of the installer instance.
describe "Operations on staged Casks" do describe "Operations on staged Casks", :cask do
describe "bundle ID" do describe "bundle ID" do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") }
let(:installer) { Hbc::Installer.new(cask) } let(:installer) { Hbc::Installer.new(cask) }

View File

@ -1,6 +1,6 @@
require "hbc/system_command" require "hbc/system_command"
describe Hbc::SystemCommand::Result do describe Hbc::SystemCommand::Result, :cask do
describe "::_parse_plist" do describe "::_parse_plist" do
subject { described_class._parse_plist(command, input) } subject { described_class._parse_plist(command, input) }
let(:command) { Hbc::SystemCommand.new("/usr/bin/true", {}) } let(:command) { Hbc::SystemCommand.new("/usr/bin/true", {}) }

View File

@ -1,4 +1,4 @@
describe Hbc::SystemCommand do describe Hbc::SystemCommand, :cask do
describe "when the exit code is 0" do describe "when the exit code is 0" do
describe "its result" do describe "its result" do
subject { described_class.run("/usr/bin/true") } subject { described_class.run("/usr/bin/true") }

View File

@ -1,4 +1,4 @@
describe Hbc::UnderscoreSupportingURI do describe Hbc::UnderscoreSupportingURI, :cask do
describe "parse" do describe "parse" do
it "works like normal on normal URLs" do it "works like normal on normal URLs" do
uri = Hbc::UnderscoreSupportingURI.parse("http://example.com/TestCask.dmg") uri = Hbc::UnderscoreSupportingURI.parse("http://example.com/TestCask.dmg")

View File

@ -1,6 +1,4 @@
require "spec_helper" describe Hbc::UrlChecker, :cask do
describe Hbc::UrlChecker do
describe "request processing" do describe "request processing" do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") } let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
let(:checker) { Hbc::UrlChecker.new(cask) } let(:checker) { Hbc::UrlChecker.new(cask) }

View File

@ -1,4 +1,4 @@
describe Hbc::Verify do describe Hbc::Verify, :cask do
let(:cask) { double("cask") } let(:cask) { double("cask") }
let(:verification_classes) { let(:verification_classes) {