Sha256: 313d7d6049713e24da75d1ee5458c2c101dc1bb67c9fb88bb4c0c133d3e76a62

Contents?: true

Size: 391 Bytes

Versions: 8

Compression:

Stored size: 391 Bytes

Contents

module RSpec
  module Matchers
    module DSL
      # See RSpec::Matchers
      def define(name, &declarations)
        define_method name do |*expected|
          $matcher_execution_context = self
          RSpec::Matchers::Matcher.new name, *expected, &declarations
        end
      end

      alias_method :matcher, :define
    end
  end
end

RSpec::Matchers.extend RSpec::Matchers::DSL

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rspec-expectations-2.0.0.beta.19 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.18 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.17 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.16 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.15 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.14 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.13 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.0.beta.12 lib/rspec/matchers/dsl.rb