aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/--cellar_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 05:59:26 +0100
committerMarkus Reiter2017-02-23 21:39:23 +0100
commiteeee7127b53eb01fd2cd9d959b3fa9d6743d6af1 (patch)
tree1e78d51670400bbdad664e5a692d417a6dcad60e /Library/Homebrew/test/cmd/--cellar_spec.rb
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-eeee7127b53eb01fd2cd9d959b3fa9d6743d6af1.tar.bz2
Convert `brew --cellar` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd/--cellar_spec.rb')
-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