aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-24 17:06:45 +0100
committerGitHub2017-02-24 17:06:45 +0100
commitefa675f532467d44256bc6f1187413a051d4dd4e (patch)
tree269faf44f78bd94862f0e818053cbddd611bb470 /Library
parentb7d3c6df627767ba59fc7834b6f9e1ba3c49c6a9 (diff)
parentd914c41b9d05fd1c010ea26d43559e9961d6e95a (diff)
downloadbrew-efa675f532467d44256bc6f1187413a051d4dd4e.tar.bz2
Merge pull request #2160 from reitermarkus/spec-cat
Convert `brew cat` test to spec.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/cat_test.rb8
-rw-r--r--Library/Homebrew/test/cmd/cat_spec.rb11
2 files changed, 11 insertions, 8 deletions
diff --git a/Library/Homebrew/test/cat_test.rb b/Library/Homebrew/test/cat_test.rb
deleted file mode 100644
index bb37b5fde..000000000
--- a/Library/Homebrew/test/cat_test.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require "testing_env"
-
-class IntegrationCommandTestCat < IntegrationCommandTestCase
- def test_cat
- formula_file = setup_test_formula "testball"
- assert_equal formula_file.read.chomp, cmd("cat", "testball")
- end
-end
diff --git a/Library/Homebrew/test/cmd/cat_spec.rb b/Library/Homebrew/test/cmd/cat_spec.rb
new file mode 100644
index 000000000..8c230abee
--- /dev/null
+++ b/Library/Homebrew/test/cmd/cat_spec.rb
@@ -0,0 +1,11 @@
+describe "brew cat", :integration_test do
+ it "prints the content of a given Formula" do
+ formula_file = setup_test_formula "testball"
+ content = formula_file.read
+
+ expect { brew "cat", "testball" }
+ .to output(content).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+end