From e18da89f3c4331d65ef32f75c3271242b41246dc Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 28 Aug 2014 22:11:08 -0500 Subject: Implement ARGV.named in terms of ARGV.options_only --- Library/Homebrew/test/test_ARGV.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/test_ARGV.rb b/Library/Homebrew/test/test_ARGV.rb index 6d2c19f53..7403acf7c 100644 --- a/Library/Homebrew/test/test_ARGV.rb +++ b/Library/Homebrew/test/test_ARGV.rb @@ -21,8 +21,13 @@ class ArgvExtensionTests < Homebrew::TestCase end def test_argv_named - @argv << 'mxcl' << '--debug' << '-v' - assert_equal 1, @argv.named.length + @argv << "foo" << "--debug" << "-v" + assert_equal %w[foo], @argv.named + end + + def test_options_only + @argv << "--foo" << "-vds" << "a" << "b" << "cdefg" + assert_equal %w[--foo -vds], @argv.options_only end def test_empty_argv -- cgit v1.2.3