Sha256: 656ef40d326d7074180de633d766e0ff92cb99b120d9e872534c6f0d4e319a49

Contents?: true

Size: 430 Bytes

Versions: 7

Compression:

Stored size: 430 Bytes

Contents

module RSpec
  module Matchers
    class Match
      include BaseMatcher

      def matches?(actual)
        super(actual).match(expected)
      end
    end

    # Given a Regexp or String, passes if actual.match(pattern)
    #
    # @example
    #
    #   email.should match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
    #   email.should match("@example.com")
    def match(expected)
      Match.new(expected)
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/rspec-expectations-2.8.0/lib/rspec/matchers/match.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/rspec-expectations-2.8.0/lib/rspec/matchers/match.rb
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/matchers/match.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-expectations-2.8.0/lib/rspec/matchers/match.rb
rspec-expectations-2.8.0 lib/rspec/matchers/match.rb
rspec-expectations-2.8.0.rc2 lib/rspec/matchers/match.rb
rspec-expectations-2.8.0.rc1 lib/rspec/matchers/match.rb