custom_matcher.rb

Path: lib/rspec/custom_matcher.rb
Last Update: Sun Feb 08 14:57:38 -0700 2009

Methods

matcher  

Public Instance methods

[Source]

    # File lib/rspec/custom_matcher.rb, line 49
49: def matcher(name, context = self.class, &block)
50:   klass = CustomMatcher.create(name, &block)
51:   context.send(:define_method, name) { |*args| klass.new(*args) }
52: end

[Validate]