method
new

1.2.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Matcher
- 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?
new(name, expected=nil, &block_passed_to_init)
public
Hide source
# File lib/spec/matchers/matcher.rb, line 4 def initialize(name, expected=nil, &block_passed_to_init) @name = name @expected = expected @block = block_passed_to_init @messages = { :description => lambda {"#{name_to_sentence} #{expected}"}, :failure_message_for_should => lambda {|actual| "expected #{actual} to #{name_to_sentence} #{expected}"}, :failure_message_for_should_not => lambda {|actual| "expected #{actual} not to #{name_to_sentence} #{expected}"} } end