summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2013-03-22 15:23:03 +0000
committerLee Jarvis <ljjarvis@gmail.com>2013-03-22 15:23:03 +0000
commit6690dd485c0ac016950fc720b58d19fd44a6f0c5 (patch)
treeb9c7b14e2356c209733fd694c7c2540ac03fba55 /test
parente60be5c85e7309251a2a94a8551575a78beda02e (diff)
downloadslop-6690dd485c0ac016950fc720b58d19fd44a6f0c5.tar.gz
ensure default help exit test does not print to stdout
Diffstat (limited to 'test')
-rw-r--r--test/slop_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/slop_test.rb b/test/slop_test.rb
index 917772a..513a0bf 100644
--- a/test/slop_test.rb
+++ b/test/slop_test.rb
@@ -131,9 +131,11 @@ class SlopTest < TestCase
end
test "default help exits" do
- slop = Slop.new :help => true
- assert_raises SystemExit do
- slop.parse %w/--help/
+ temp_stdout do
+ slop = Slop.new :help => true
+ assert_raises SystemExit do
+ slop.parse %w/--help/
+ end
end
end