summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-11-19 22:34:06 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-11-19 22:34:06 +0000
commitf4611c9c7c07cae1fff3c9db81d96994cf834dab (patch)
tree46af94d6d7043f35bc6f34cb4f377b80e02480f5 /test
parent9f8707f19f6e1835e5941b20af51887b7754719a (diff)
downloadslop-f4611c9c7c07cae1fff3c9db81d96994cf834dab.tar.gz
Default array values to []
Diffstat (limited to 'test')
-rw-r--r--test/types_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/types_test.rb b/test/types_test.rb
index b359408..44846b1 100644
--- a/test/types_test.rb
+++ b/test/types_test.rb
@@ -42,6 +42,10 @@ describe Slop::ArrayOption do
@result = @options.parse %w(--files foo.txt,bar.rb)
end
+ it "defaults to []" do
+ assert_equal [], @result[:d]
+ end
+
it "parses comma separated args" do
assert_equal %w(foo.txt bar.rb), @result[:files]
end