Sha256: d872c8fce3356cbf092571a67bf7afd5bf23312bd438d48a4b70b7e7e41998e6
Contents?: true
Size: 565 Bytes
Versions: 59
Compression:
Stored size: 565 Bytes
Contents
module RSpec module Matchers module DSL # Defines a custom matcher. # @see RSpec::Matchers def define(name, &declarations) matcher = RSpec::Matchers::DSL::Matcher.new(name, &declarations) define_method name do |*expected| $matcher_execution_context = self matcher.for_expected(*expected) end end alias_method :matcher, :define if RSpec.respond_to?(:configure) RSpec.configure {|c| c.extend self} end end end end RSpec::Matchers.extend RSpec::Matchers::DSL
Version data entries
59 entries across 59 versions & 5 rubygems