method
define_methods_from_predicate_matchers
RSpec latest stable (1.3.1)
-
0 notes -
Class: Spec::Example::PredicateMatchers
- 1.1.4
- 1.1.12
- 1.2.0 (0)
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
define_methods_from_predicate_matchers(# :nodoc:)
public
Hide source
# File lib/spec/example/predicate_matchers.rb, line 36 def define_methods_from_predicate_matchers # :nodoc: predicate_matchers.each_pair do |matcher_method, method_on_object| define_method matcher_method do |*args| eval("be_#{method_on_object.to_s.gsub('?','')}(*args)") end end end