diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2015-01-02 16:59:11 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2015-01-02 16:59:11 +0000 |
commit | 4057bcf675147ac0c39306a7b74a7996f102a191 (patch) | |
tree | d43c55d1e8c54480c860c25d1a584c313e5c73e1 /test | |
parent | eb0164aea27b43f24c05e16c3d699dac520c9945 (diff) | |
download | slop-4057bcf675147ac0c39306a7b74a7996f102a191.tar.gz |
Support `tail: true` config option
Diffstat (limited to 'test')
-rw-r--r-- | test/options_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/options_test.rb b/test/options_test.rb index 5b12f7b..65461db 100644 --- a/test/options_test.rb +++ b/test/options_test.rb @@ -75,5 +75,11 @@ describe Slop::Options do @options.on "-x", "something", help: false refute_match(/something/, @options.to_s) end + + it "adds 'tail' options to the bottom of the help text" do + @options.on "-h", "--help", tail: true + @options.on "-f", "--foo" + assert_match(/^ -h, --help/, @options.to_s.lines.last) + end end end |