diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 15:56:30 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 15:56:30 +0000 |
commit | 899830973c6bed61d1230894f6a70cf4fe4e8339 (patch) | |
tree | 0efa88a59c2be777b25399e772549b7f75d64d21 /test | |
parent | fb1fd2bfe35f1f9784541fd4fcfb0e2d8efd5356 (diff) | |
download | slop-899830973c6bed61d1230894f6a70cf4fe4e8339.tar.gz |
Allow options to be hidden from help string
Diffstat (limited to 'test')
-rw-r--r-- | test/options_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/options_test.rb b/test/options_test.rb index 3ce0863..57083ac 100644 --- a/test/options_test.rb +++ b/test/options_test.rb @@ -70,5 +70,10 @@ describe Slop::Options do @options.add "-f", "--foo" assert_match(/^ -f, --foo/, @options.to_s(prefix: " ")) end + + it "ignores options with help: false" do + @options.add "-x", "something", help: false + refute_match(/something/, @options.to_s) + end end end |