summaryrefslogtreecommitdiff
path: root/test/slop_test.rb
diff options
context:
space:
mode:
authorKenichi Kamiya <kachick1@gmail.com>2012-10-10 21:47:02 +0900
committerKenichi Kamiya <kachick1@gmail.com>2012-10-11 09:49:31 +0900
commitccaf8daae6cceab7ec78b073408a5bbf8c1d1250 (patch)
treeec7d5a597fba25bc1791f5e81407a38e9809891e /test/slop_test.rb
parent5757bcd5a3441eb72b2dad6cd73d1b78fe107389 (diff)
downloadslop-ccaf8daae6cceab7ec78b073408a5bbf8c1d1250.tar.gz
add test-case for fix Slop#to_s, that brake config-banner
Diffstat (limited to 'test/slop_test.rb')
-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 a27d307..d443ce2 100644
--- a/test/slop_test.rb
+++ b/test/slop_test.rb
@@ -378,4 +378,14 @@ class SlopTest < TestCase
end
end
+ test "to_s do not break self" do
+ slop = Slop.new do
+ banner "foo"
+ end
+
+ assert_equal "foo", slop.banner
+ slop.to_s
+ assert_equal "foo", slop.banner
+ end
+
end