diff options
author | Lee Jarvis <lee@jarvis.co> | 2012-05-15 16:49:15 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2012-05-15 16:49:15 +0100 |
commit | 8e45cf9de2159498a484442e74e121d29aa64cc6 (patch) | |
tree | 7ba415bd4645d1a9dea8ef2b339518e255082154 /test/slop_test.rb | |
parent | fcc2debaa4a2f0f4590c06fd2a54085318cc41e4 (diff) | |
parent | 68d35f89e092d1ca12810b233b40d567b081c4dc (diff) | |
download | slop-8e45cf9de2159498a484442e74e121d29aa64cc6.tar.gz |
Merge branch 'master' into to_hash_boolean_options
Diffstat (limited to 'test/slop_test.rb')
-rw-r--r-- | test/slop_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/slop_test.rb b/test/slop_test.rb index 2ccadb2..0516a23 100644 --- a/test/slop_test.rb +++ b/test/slop_test.rb @@ -263,6 +263,13 @@ class SlopTest < TestCase assert opts.foo_bar? end + test "supporting underscore" do + opts = Slop.new { on :foo_bar= } + opts.parse %w' --foo_bar baz ' + assert_equal 'baz', opts[:foo_bar] + assert opts.foo_bar? + end + test "parsing an optspec and building options" do optspec = <<-SPEC ruby foo.rb [options] |