Sha256: acbf3d9a5a71a36064b80d7385f1a97665d08759c57d87deb54d64947a6648eb

Contents?: true

Size: 501 Bytes

Versions: 56

Compression:

Stored size: 501 Bytes

Contents

module RSpec
  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

56 entries across 56 versions & 6 rubygems

Version Path
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.5 vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.4 vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.3 vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.2 vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
nutshell-crm-0.0.1 vendor/bundle/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
rspec-expectations-2.7.0 lib/rspec/matchers/match.rb
rspec-expectations-2.7.0.rc1 lib/rspec/matchers/match.rb
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/lib/rspec/matchers/match.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/lib/rspec/matchers/match.rb
rspec-expectations-2.6.0 lib/rspec/matchers/match.rb
rspec-expectations-2.6.0.rc6 lib/rspec/matchers/match.rb
rspec-expectations-2.6.0.rc4 lib/rspec/matchers/match.rb
rspec-expectations-2.6.0.rc2 lib/rspec/matchers/match.rb
rspec-expectations-2.5.0 lib/rspec/matchers/match.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/match.rb
rspec-expectations-2.4.0 lib/rspec/matchers/match.rb