Cleanup no cask on linux specs
This commit is contained in:
parent
5d27b70757
commit
a178fc6a88
@ -67,7 +67,7 @@ describe Homebrew::CLI::NamedArgs do
|
||||
end
|
||||
|
||||
describe "#to_formulae_and_casks" do
|
||||
it "returns formulae and casks" do
|
||||
it "returns formulae and casks", :dev_on_linux do
|
||||
stub_formula_loader foo, call_original: true
|
||||
stub_cask_loader baz, call_original: true
|
||||
|
||||
@ -121,10 +121,10 @@ describe Homebrew::CLI::NamedArgs do
|
||||
it "raises an error when formula is absent and cask is available on linux", :needs_linux do
|
||||
stub_cask_loader foo_cask
|
||||
|
||||
expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaOrCaskUnavailableError)
|
||||
expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaUnavailableError)
|
||||
end
|
||||
|
||||
it "returns formula when formula is present and cask is unreadable" do
|
||||
it "returns formula when formula is present and cask is unreadable", :dev_on_linux do
|
||||
stub_formula_loader foo
|
||||
setup_unredable_cask "foo"
|
||||
|
||||
@ -140,7 +140,7 @@ describe Homebrew::CLI::NamedArgs do
|
||||
expect { described_class.new("foo").to_formulae_and_casks }.to output(/Failed to load formula: foo/).to_stderr
|
||||
end
|
||||
|
||||
it "raises an error when formula is absent and cask is unreadable" do
|
||||
it "raises an error when formula is absent and cask is unreadable", :dev_on_linux do
|
||||
setup_unredable_cask "foo"
|
||||
|
||||
expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(Cask::CaskUnreadableError)
|
||||
|
@ -570,13 +570,11 @@ describe Homebrew::CLI::Parser do
|
||||
end
|
||||
end
|
||||
|
||||
it "throws an error for normal users" do
|
||||
allow(Homebrew::EnvConfig).to receive(:developer?).and_return(false)
|
||||
it "throws an error by default" do
|
||||
expect { parser.parse(["--cask"]) }.to raise_error UsageError, /Casks are not supported on Linux/
|
||||
end
|
||||
|
||||
it "only warns developers" do
|
||||
allow(Homebrew::EnvConfig).to receive(:developer?).and_return(true)
|
||||
it "only warns developers", :dev_on_linux do
|
||||
expect { parser.parse(["--cask"]) }.not_to raise_error
|
||||
end
|
||||
end
|
||||
|
@ -9,7 +9,6 @@ describe "brew --cache" do
|
||||
it "prints all cache files for a given Formula", :integration_test do
|
||||
expect { brew "--cache", testball }
|
||||
.to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-}o).to_stdout
|
||||
.and output(/Treating #{Regexp.escape(testball)} as a formula/).to_stderr
|
||||
.and be_a_success
|
||||
expect { brew "--cache", "--formula", testball }
|
||||
.to output(%r{#{HOMEBREW_CACHE}/downloads/[\da-f]{64}--testball-}o).to_stdout
|
||||
@ -28,7 +27,7 @@ describe "brew --cache" do
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
it "prints the cache files for a given Formula and Cask", :integration_test, :dev_on_linux do
|
||||
it "prints the cache files for a given Formula and Cask", :integration_test, :needs_macos do
|
||||
expect { brew "--cache", testball, cask_path("local-caffeine") }
|
||||
.to output(
|
||||
%r{
|
||||
|
@ -45,7 +45,7 @@ describe "brew home" do
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
it "opens the homepages for a given formula and Cask", :integration_test, :dev_on_linux do
|
||||
it "opens the homepages for a given formula and Cask", :integration_test, :needs_macos do
|
||||
setup_test_formula "testballhome"
|
||||
|
||||
expect { brew "home", "testballhome", local_caffeine_path, "HOMEBREW_BROWSER" => "echo" }
|
||||
|
@ -181,7 +181,7 @@ RSpec.configure do |config|
|
||||
end
|
||||
|
||||
config.before(:each, :dev_on_linux) do
|
||||
Allow(Homebrew::EnvConfig).to receive(:developer?).and_return(true) if OS.linux?
|
||||
allow(Homebrew::EnvConfig).to receive(:developer?).and_return(true) if OS.linux?
|
||||
end
|
||||
|
||||
config.around do |example|
|
||||
|
Loading…
x
Reference in New Issue
Block a user