From 4057bcf675147ac0c39306a7b74a7996f102a191 Mon Sep 17 00:00:00 2001 From: Lee Jarvis Date: Fri, 2 Jan 2015 16:59:11 +0000 Subject: Support `tail: true` config option --- test/options_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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 -- cgit v1.2.1