method

match

Importance_1
RSpec latest stable (1.2.8) - 0 notes - Class: Spec::Matchers
match(expected) public

Given a Regexp or String, passes if actual.match(pattern)

Examples

  email.should match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
  email.should match("@example.com")
Show source
Register or log in to add new notes.