Remove unused branches from Options.coerce

This commit is contained in:
Jack Nagel 2014-08-12 23:55:28 -05:00
parent 28bd10551f
commit 0a2be32d80
2 changed files with 0 additions and 11 deletions

View File

@ -116,8 +116,6 @@ class Options
def self.coerce(arg) def self.coerce(arg)
case arg case arg
when self then arg
when Option then new << arg
when Array when Array
opts = new opts = new
arg.each do |a| arg.each do |a|

View File

@ -132,15 +132,6 @@ class OptionsTests < Homebrew::TestCase
assert_equal [foo, bar, baz].sort, (@options | options).to_a.sort assert_equal [foo, bar, baz].sort, (@options | options).to_a.sort
end 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 def test_coerce_with_array
array = %w{--foo --bar} array = %w{--foo --bar}
option1 = Option.new("foo") option1 = Option.new("foo")