Convert brew options test to spec.

This commit is contained in:
Markus Reiter 2017-02-23 06:05:20 +01:00
parent c7121f6be5
commit be2645b04f
2 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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