diff options
author | Autumn Perrault <autumn@destellae.net> | 2013-03-10 12:27:54 -0600 |
---|---|---|
committer | Autumn Perrault <autumn@destellae.net> | 2013-03-10 12:27:54 -0600 |
commit | d67c40c9ca3f32e235ce5298ad2c8a0b5a73ffaf (patch) | |
tree | 4487cdb5c74b86d392160709e5580e4c9303af49 /test/slop_test.rb | |
parent | 258a21dbac024cab3506914cda12ed38e2aeeb0c (diff) | |
download | slop-d67c40c9ca3f32e235ce5298ad2c8a0b5a73ffaf.tar.gz |
Adding a test for the behavior added by ce2b17e and 258a21d.
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 04cc95b..917772a 100644 --- a/test/slop_test.rb +++ b/test/slop_test.rb @@ -130,6 +130,13 @@ class SlopTest < TestCase assert_equal 'Display this help message.', slop.options.first.description end + test "default help exits" do + slop = Slop.new :help => true + assert_raises SystemExit do + slop.parse %w/--help/ + end + end + test ":arguments and :optional_arguments config options" do slop = Slop.new(:arguments => true) { on :foo } assert slop.fetch_option(:foo).expects_argument? |