Stop exposing defined options from the build object

This commit is contained in:
Jack Nagel 2014-08-10 22:55:28 -05:00
parent 8beb85a7fc
commit 161778f0f4
2 changed files with 0 additions and 19 deletions

View File

@ -1,8 +1,6 @@
require 'options'
class BuildOptions
include Enumerable
attr_accessor :args
attr_accessor :universal
@ -16,18 +14,6 @@ class BuildOptions
@args = other.args.dup
end
def empty?
@options.empty?
end
def each(*args, &block)
@options.each(*args, &block)
end
def as_flags
@options.as_flags
end
def include? name
args.include? '--' + name
end

View File

@ -10,11 +10,6 @@ class BuildOptionsTests < Homebrew::TestCase
@build = BuildOptions.new(args, opts)
end
def test_as_flags
assert_equal %w{--with-foo --with-bar --without-baz --without-qux}.sort,
@build.as_flags.sort
end
def test_include
assert_includes @build, "with-foo"
refute_includes @build, "with-qux"