Remove unused branches from Options.coerce
This commit is contained in:
parent
28bd10551f
commit
0a2be32d80
@ -116,8 +116,6 @@ class Options
|
||||
|
||||
def self.coerce(arg)
|
||||
case arg
|
||||
when self then arg
|
||||
when Option then new << arg
|
||||
when Array
|
||||
opts = new
|
||||
arg.each do |a|
|
||||
|
||||
@ -132,15 +132,6 @@ class OptionsTests < Homebrew::TestCase
|
||||
assert_equal [foo, bar, baz].sort, (@options | options).to_a.sort
|
||||
end
|
||||
|
||||
def test_coerce_with_options
|
||||
assert_same @options, Options.coerce(@options)
|
||||
end
|
||||
|
||||
def test_coerce_with_option
|
||||
option = Option.new("foo")
|
||||
assert_equal option, Options.coerce(option).to_a.first
|
||||
end
|
||||
|
||||
def test_coerce_with_array
|
||||
array = %w{--foo --bar}
|
||||
option1 = Option.new("foo")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user