diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-04-14 22:41:59 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-04-14 22:41:59 +0100 |
commit | 2abb114aeeed3357ae69e902c8bd8a9720cc7449 (patch) | |
tree | a5adcf86fbcbd1b6d56eb8030d20cc23f3040af4 | |
parent | 96792eba8ccaff2f4f5c286be4269faa127df1d1 (diff) | |
download | slop-2abb114aeeed3357ae69e902c8bd8a9720cc7449.tar.gz |
test for raising if a command exists already
-rw-r--r-- | test/slop_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/slop_test.rb b/test/slop_test.rb index e43aa3d..e9478d9 100644 --- a/test/slop_test.rb +++ b/test/slop_test.rb @@ -322,6 +322,12 @@ class SlopTest < TestCase assert_nil slop.commands['bar'] end + test 'repeating existing commands' do + slop = Slop.new + slop.command :foo + assert_raises(ArgumentError) { slop.command :foo } + end + test 'commands inheriting options' do slop = Slop.new :strict do command :foo do end |