mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/assertions.rb (Test::Unit::Assertions): aliases
assert_not_ methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1f125adde0
commit
8fc45476eb
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Feb 15 21:22:48 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit/assertions.rb (Test::Unit::Assertions): aliases
|
||||||
|
assert_not_ methods.
|
||||||
|
|
||||||
Sun Feb 15 16:57:35 2009 Tanaka Akira <akr@fsij.org>
|
Sun Feb 15 16:57:35 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* lib/securerandom.rb (SecureRandom.urlsafe_base64): new method.
|
* lib/securerandom.rb (SecureRandom.urlsafe_base64): new method.
|
||||||
|
|
|
@ -122,6 +122,10 @@ EOT
|
||||||
super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth)
|
super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
instance_methods(true).grep(/\Arefute_/) do |m|
|
||||||
|
alias_method(('assert_not_' << m.to_s[/.*?_(.*)/, 1]), m)
|
||||||
|
end
|
||||||
|
|
||||||
def build_message(head, template=nil, *arguments)
|
def build_message(head, template=nil, *arguments)
|
||||||
template &&= template.chomp
|
template &&= template.chomp
|
||||||
template.gsub(/\?/) { mu_pp(arguments.shift) }
|
template.gsub(/\?/) { mu_pp(arguments.shift) }
|
||||||
|
|
Loading…
Reference in a new issue