Sha256: 1f320e1bc7a50bf5725ad5bbb37f2d38e917b554d57b186604cbb21b4cb09ad6
Contents?: true
Size: 436 Bytes
Versions: 2
Compression:
Stored size: 436 Bytes
Contents
module Spec module Matchers # :call-seq: # should match(regexp) # should_not match(regexp) # # Given a Regexp, passes if actual =~ regexp # # == Examples # # email.should match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) def match(expected) Matcher.new :match, expected do |_expected_| match do |actual| actual =~ _expected_ end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-1.2.6 | lib/spec/matchers/match.rb |
rspec-1.2.5 | lib/spec/matchers/match.rb |