aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 06:51:28 +0100
committerGitHub2017-02-25 06:51:28 +0100
commit9d6962a8e44c111dac1972b63e4a0fa410da42da (patch)
tree2a8cdd06235e56ae7265338c0e3232158e7ec4aa /Library/Homebrew/test/cmd
parent8618aa7dcd97f008d550a6a7ce0719ecb607b445 (diff)
parenteeee7127b53eb01fd2cd9d959b3fa9d6743d6af1 (diff)
downloadbrew-9d6962a8e44c111dac1972b63e4a0fa410da42da.tar.bz2
Merge pull request #2162 from reitermarkus/spec---cellar
Convert `brew --cellar` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd')
-rw-r--r--Library/Homebrew/test/cmd/--cellar_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/--cellar_spec.rb b/Library/Homebrew/test/cmd/--cellar_spec.rb
new file mode 100644
index 000000000..6c8d7dea6
--- /dev/null
+++ b/Library/Homebrew/test/cmd/--cellar_spec.rb
@@ -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