Convert brew --cellar test to spec.
This commit is contained in:
parent
c7121f6be5
commit
eeee7127b5
@ -1,8 +0,0 @@
|
||||
require "testing_env"
|
||||
|
||||
class IntegrationCommandTestCellarFormula < IntegrationCommandTestCase
|
||||
def test_cellar_formula
|
||||
assert_match "#{HOMEBREW_CELLAR}/testball",
|
||||
cmd("--cellar", testball)
|
||||
end
|
||||
end
|
||||
@ -1,8 +0,0 @@
|
||||
require "testing_env"
|
||||
|
||||
class IntegrationCommandTestCellar < IntegrationCommandTestCase
|
||||
def test_cellar
|
||||
assert_equal HOMEBREW_CELLAR.to_s,
|
||||
cmd("--cellar")
|
||||
end
|
||||
end
|
||||
15
Library/Homebrew/test/cmd/--cellar_spec.rb
Normal file
15
Library/Homebrew/test/cmd/--cellar_spec.rb
Normal file
@ -0,0 +1,15 @@
|
||||
describe "brew --cellar", :integration_test do
|
||||
it "print the location of Homebrew's Cellar when no argument is given" do
|
||||
expect { brew "--cellar" }
|
||||
.to output("#{HOMEBREW_CELLAR}\n").to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
it "returns the Cellar subdirectory for a given Formula" do
|
||||
expect { brew "--cellar", testball }
|
||||
.to output(%r{#{HOMEBREW_CELLAR}/testball}).to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user