Method: MiniTest::Assertions#refute_match

Defined in:
lib/minitest/unit.rb

#refute_match(exp, act, msg = nil) ⇒ Object

Fails if exp =~ act


458
459
460
461
462
463
# File 'lib/minitest/unit.rb', line 458

def refute_match exp, act, msg = nil
  msg = message(msg) { "Expected #{mu_pp(exp)} to not match #{mu_pp(act)}" }
  assert_respond_to act, :"=~"
  exp = (/#{Regexp.escape exp}/) if String === exp and String === act
  refute exp =~ act, msg
end