diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-11-04 19:04:31 -0700 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-11-04 19:04:31 -0700 |
commit | 18fcb3f03148656e76e808fd744e597bebfa3871 (patch) | |
tree | 827cb5f467af7085e07b564c91fc21d015859b80 /test/option_test.rb | |
parent | 05e97091fd01910409e513bae968357b053ffb64 (diff) | |
download | slop-18fcb3f03148656e76e808fd744e597bebfa3871.tar.gz |
allow foo= long flag options for options which accept an argument
Diffstat (limited to 'test/option_test.rb')
-rw-r--r-- | test/option_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/option_test.rb b/test/option_test.rb index d7eec0e..ef8633e 100644 --- a/test/option_test.rb +++ b/test/option_test.rb @@ -25,6 +25,11 @@ class OptionTest < TestCase refute option(:f, :foo).expects_argument? end + test 'expects an argument if long option is suffixed with =' do + assert option(:f, :foo=).expects_argument? + assert option('f', 'foo=').expects_argument? + end + test 'accepts an optional argument if optional is true' do assert option(:f, :optional => true).accepts_optional_argument? assert option(:f, false, :optional => true).accepts_optional_argument? |