From a3b2ae1fa12216200bd6399269f20d0a420aca49 Mon Sep 17 00:00:00 2001
From: Markus Reiter <me@reitermark.us>
Date: Thu, 23 Feb 2017 06:01:02 +0100
Subject: [PATCH] Convert `brew formula` test to spec.

---
 Library/Homebrew/test/dev-cmd/formula_spec.rb | 10 ++++++++++
 Library/Homebrew/test/formula_cmd_test.rb     |  8 --------
 2 files changed, 10 insertions(+), 8 deletions(-)
 create mode 100644 Library/Homebrew/test/dev-cmd/formula_spec.rb
 delete mode 100644 Library/Homebrew/test/formula_cmd_test.rb

diff --git a/Library/Homebrew/test/dev-cmd/formula_spec.rb b/Library/Homebrew/test/dev-cmd/formula_spec.rb
new file mode 100644
index 0000000000..cc5b3e9e84
--- /dev/null
+++ b/Library/Homebrew/test/dev-cmd/formula_spec.rb
@@ -0,0 +1,10 @@
+describe "brew formula", :integration_test do
+  it "prints a given Formula's path" do
+    formula_file = setup_test_formula "testball"
+
+    expect { brew "formula", "testball" }
+      .to output("#{formula_file}\n").to_stdout
+      .and not_to_output.to_stderr
+      .and be_a_success
+  end
+end
diff --git a/Library/Homebrew/test/formula_cmd_test.rb b/Library/Homebrew/test/formula_cmd_test.rb
deleted file mode 100644
index abbe42d985..0000000000
--- a/Library/Homebrew/test/formula_cmd_test.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require "testing_env"
-
-class IntegrationCommandTestFormula < IntegrationCommandTestCase
-  def test_formula
-    formula_file = setup_test_formula "testball"
-    assert_equal formula_file.to_s, cmd("formula", "testball")
-  end
-end
-- 
GitLab