Methods

Class Index [+]

Quicksearch

RSpec::Matchers::DSL

Public Instance Methods

define(name, &declarations) click to toggle source

Defines a custom matcher. @see RSpec::Matchers

    # File lib/rspec/matchers/dsl.rb, line 6
 6:       def define(name, &declarations)
 7:         matcher_template = RSpec::Matchers::DSL::Matcher.new(name, &declarations)
 8:         define_method name do |*expected|
 9:           matcher = matcher_template.for_expected(*expected)
10:           matcher.matcher_execution_context = @matcher_execution_context ||= self
11:           matcher
12:         end
13:       end
Also aliased as: matcher
matcher(name, &declarations) click to toggle source
Alias for: define

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.