Created
October 29, 2014 12:17
-
-
Save kou/1bf17a2bc6e934be3075 to your computer and use it in GitHub Desktop.
脱minitest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: envutil.rb | |
=================================================================== | |
--- envutil.rb (revision 48187) | |
+++ envutil.rb (working copy) | |
@@ -400,8 +400,11 @@ | |
def assert_warning(pat, msg = nil) | |
stderr = EnvUtil.verbose_warning { yield } | |
- msg = message(msg) {diff pat, stderr} | |
- assert(pat === stderr, msg) | |
+ if pat.is_a?(Regexp) | |
+ assert_match(pat, stderr) | |
+ else | |
+ assert_equal(pat, stderr) | |
+ end | |
end | |
def assert_warn(*args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment