diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2014-10-29 15:32:02 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2014-10-29 15:32:02 +0900 |
commit | c9617a6e08790d831afe0be982ead64601848ee1 (patch) | |
tree | 9fc4d4ce9225d2653af9177279045d68b7702258 /test | |
parent | dfce792446411e0648718f884df2a76492d0e1c3 (diff) | |
download | ruby-openssl-c9617a6e08790d831afe0be982ead64601848ee1.tar.gz |
added helper method of minitest
Diffstat (limited to 'test')
-rw-r--r-- | test/utils.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/utils.rb b/test/utils.rb index c6e0ccf3..607daea8 100644 --- a/test/utils.rb +++ b/test/utils.rb @@ -334,3 +334,17 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC end end if defined?(OpenSSL) + +module Test + module Unit + class TestCase + def message msg = nil, ending = ".", &default + proc { + msg = msg.call.chomp(".") if Proc === msg + custom_message = "#{msg}.\n" unless msg.nil? or msg.to_s.empty? + "#{custom_message}#{default.call}#{ending}" + } + end + end + end +end |