Stop exposing defined options from the build object
This commit is contained in:
parent
8beb85a7fc
commit
161778f0f4
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user