Fix cask API tests

This commit is contained in:
Rylan Polster 2025-06-11 19:44:26 -04:00
parent ce72e34b19
commit b242abfdf0
No known key found for this signature in database
5 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ RSpec.describe Cask::Artifact::Artifact, :cask do
end
context "without target" do
it "fails to load" do
it "fails to load", :no_api do
expect do
Cask::CaskLoader.load("invalid-generic-artifact-no-target")
end.to raise_error(Cask::CaskInvalidError, /Generic Artifact.*requires.*target/)

View File

@ -6,7 +6,7 @@ RSpec.describe Cask::Artifact::Manpage, :cask do
context "without section" do
let(:cask_token) { "invalid-manpage-no-section" }
it "fails to load a cask without section" do
it "fails to load a cask without section", :no_api do
expect { cask }.to raise_error(Cask::CaskInvalidError, /is not a valid man page name/)
end
end

View File

@ -503,7 +503,7 @@ RSpec.describe Cask::Audit, :cask do
end
end
describe "livecheck should be skipped" do
describe "livecheck should be skipped", :no_api do
let(:only) { ["livecheck_version"] }
let(:online) { true }
let(:message) { /Version '[^']*' differs from '[^']*' retrieved by livecheck\./ }

View File

@ -24,7 +24,7 @@ RSpec.describe Cask::CaskLoader::FromTapLoader do
expect { described_class.new("foo/bar/baz").load(config: nil) }.to raise_error(Cask::CaskUnavailableError)
end
context "with sharded Cask directory" do
context "with sharded Cask directory", :no_api do
let(:cask_path) { tap.cask_dir/cask_name[0]/"#{cask_name}.rb" }
it "returns a Cask" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe Cask::DSL, :cask do
RSpec.describe Cask::DSL, :cask, :no_api do
let(:cask) { Cask::CaskLoader.load(token) }
let(:token) { "basic-cask" }