aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-24 18:09:54 +0100
committerGitHub2017-02-24 18:09:54 +0100
commit7a0fa34a80ce2fb30154d1ae2d0e9a56eda201c4 (patch)
tree602bb9f25026852165932a09616deb569eff9c48
parent9a47205b0eb7b016989259de9238223854eed2ed (diff)
parentbe2645b04f3b001069daf353289a19155afaf00c (diff)
downloadbrew-7a0fa34a80ce2fb30154d1ae2d0e9a56eda201c4.tar.bz2
Merge pull request #2132 from reitermarkus/spec-options
Convert `brew options` test to spec.
-rw-r--r--Library/Homebrew/test/cmd/options_spec.rb12
-rw-r--r--Library/Homebrew/test/options_test.rb12
2 files changed, 12 insertions, 12 deletions
diff --git a/Library/Homebrew/test/cmd/options_spec.rb b/Library/Homebrew/test/cmd/options_spec.rb
new file mode 100644
index 000000000..33fe8b107
--- /dev/null
+++ b/Library/Homebrew/test/cmd/options_spec.rb
@@ -0,0 +1,12 @@
+describe "brew options", :integration_test do
+ it "prints a given Formula's options" do
+ setup_test_formula "testball", <<-EOS.undent
+ depends_on "bar" => :recommended
+ EOS
+
+ expect { brew "options", "testball" }
+ .to output("--with-foo\n\tBuild with foo\n--without-bar\n\tBuild without bar support\n\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+end
diff --git a/Library/Homebrew/test/options_test.rb b/Library/Homebrew/test/options_test.rb
index 09ea14180..0a6e198d3 100644
--- a/Library/Homebrew/test/options_test.rb
+++ b/Library/Homebrew/test/options_test.rb
@@ -1,17 +1,5 @@
require "testing_env"
require "options"
-require "testing_env"
-
-class IntegrationCommandTestOptions < IntegrationCommandTestCase
- def test_options
- setup_test_formula "testball", <<-EOS.undent
- depends_on "bar" => :recommended
- EOS
-
- assert_equal "--with-foo\n\tBuild with foo\n--without-bar\n\tBuild without bar support",
- cmd("options", "testball").chomp
- end
-end
class OptionTests < Homebrew::TestCase
def setup