Sha256: 741dbf9a0d323ffceba01cd35559c8c908bc5feaba8a9dfe1bf115179b036399
Contents?: true
Size: 500 Bytes
Versions: 34
Compression:
Stored size: 500 Bytes
Contents
module Spec module Matchers # :call-seq: # should match(pattern) # should_not match(pattern) # # 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") def match(expected) Matcher.new :match, expected do |_expected_| match do |actual| actual.match(_expected_) end end end end end
Version data entries
34 entries across 34 versions & 11 rubygems