Sha256: 4401bc25df26ff8c127d65ee34c962e4edc101b2d31565e130eb4f27b9796ca8

Contents?: true

Size: 485 Bytes

Versions: 34

Compression:

Stored size: 485 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

      if RSpec.respond_to?(:configure)
        RSpec.configure {|c| c.extend self}
      end
    end
  end
end

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

Version data entries

34 entries across 34 versions & 4 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/lib/rspec/matchers/dsl.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/lib/rspec/matchers/dsl.rb
rspec-expectations-2.6.0 lib/rspec/matchers/dsl.rb
rspec-expectations-2.6.0.rc6 lib/rspec/matchers/dsl.rb
rspec-expectations-2.6.0.rc4 lib/rspec/matchers/dsl.rb
rspec-expectations-2.6.0.rc2 lib/rspec/matchers/dsl.rb
rspec-expectations-2.5.0 lib/rspec/matchers/dsl.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
rspec-expectations-2.4.0 lib/rspec/matchers/dsl.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
rspec-expectations-2.3.0 lib/rspec/matchers/dsl.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb
rspec-expectations-2.2.0 lib/rspec/matchers/dsl.rb
rspec-expectations-2.1.0 lib/rspec/matchers/dsl.rb
rspec-expectations-2.0.1 lib/rspec/matchers/dsl.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/dsl.rb