diff --git a/Library/Homebrew/test/cmd/options_spec.rb b/Library/Homebrew/test/cmd/options_spec.rb new file mode 100644 index 0000000000000000000000000000000000000000..33fe8b1078e4a508c8e00dcfd57e8aa145e27b6a --- /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 09ea14180e970e53ec8253b5228475c545e79ba4..0a6e198d3bbbc83136f52226f787a966bdf3176a 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