Convert brew options test to spec.
This commit is contained in:
parent
c7121f6be5
commit
be2645b04f
12
Library/Homebrew/test/cmd/options_spec.rb
Normal file
12
Library/Homebrew/test/cmd/options_spec.rb
Normal 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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user