summaryrefslogtreecommitdiff
path: root/test/option_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/option_test.rb')
-rw-r--r--test/option_test.rb5
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?