Convert brew --prefix
test to spec.
This commit is contained in:
parent
0c0a77030e
commit
201f3abea0
15
Library/Homebrew/test/cmd/--prefix_spec.rb
Normal file
15
Library/Homebrew/test/cmd/--prefix_spec.rb
Normal file
@ -0,0 +1,15 @@
|
||||
describe "brew --prefix", :integration_test do
|
||||
it "prints the Homebrew prefix when no argument is given" do
|
||||
expect { brew "--prefix" }
|
||||
.to output("#{HOMEBREW_PREFIX}\n").to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
it "prints a given Formula's prefix" do
|
||||
expect { brew "--prefix", testball }
|
||||
.to output(%r{#{HOMEBREW_CELLAR}/testball}).to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
end
|
||||
end
|
@ -1,8 +0,0 @@
|
||||
require "testing_env"
|
||||
|
||||
class IntegrationCommandTestPrefixFormula < IntegrationCommandTestCase
|
||||
def test_prefix_formula
|
||||
assert_match "#{HOMEBREW_CELLAR}/testball",
|
||||
cmd("--prefix", testball)
|
||||
end
|
||||
end
|
@ -1,8 +0,0 @@
|
||||
require "testing_env"
|
||||
|
||||
class IntegrationCommandTestPrefix < IntegrationCommandTestCase
|
||||
def test_prefix
|
||||
assert_equal HOMEBREW_PREFIX.to_s,
|
||||
cmd("--prefix")
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user