diff options
Diffstat (limited to 'test/option_test.rb')
-rw-r--r-- | test/option_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/option_test.rb b/test/option_test.rb index be0ede0..cfe7620 100644 --- a/test/option_test.rb +++ b/test/option_test.rb @@ -83,5 +83,12 @@ class OptionTest < TestCase assert_equal 'rab', opt.value end + test "using a default value as fallback" do + opts = Slop.new + opt = opts.on :f, :argument => :optional, :default => 'foo' + opts.parse %w'-f' + assert_equal 'foo', opts[:f] + end + # end type casting tests end
\ No newline at end of file |