summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2013-06-16 09:55:00 +0100
committerLee Jarvis <ljjarvis@gmail.com>2013-08-13 20:34:43 +0100
commite5b41c5629957e27a86ca4b785baaae9e1b01df0 (patch)
treedf6572dc1c9d550186482f1f7df78f3c3c88683c /test
parent0049a031d5d0eec8f811d636ce9001381b8dd1cd (diff)
downloadslop-e5b41c5629957e27a86ca4b785baaae9e1b01df0.tar.gz
Slop::Error now has a slop attribute and a help method
Diffstat (limited to 'test')
-rw-r--r--test/slop_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/slop_test.rb b/test/slop_test.rb
index 0a1bf1a..02fbdc7 100644
--- a/test/slop_test.rb
+++ b/test/slop_test.rb
@@ -487,4 +487,14 @@ class SlopTest < TestCase
assert_equal 'second', i
end
+ test 'Slop::Error sets @slop and has a help method' do
+ s = Slop.new
+ begin
+ s.parse %w'--abc'
+ rescue Slop::Error => e
+ assert_equal s, e.slop
+ assert_equal s.help, e.help
+ end
+ end
+
end