Class: Specifier::Expectation
- Inherits:
-
Object
- Object
- Specifier::Expectation
- Defined in:
- lib/specifier/expectation.rb
Defined Under Namespace
Classes: Miss
Instance Method Summary collapse
-
#initialize(value) ⇒ Expectation
constructor
A new instance of Expectation.
- #to(matcher) ⇒ Object
Constructor Details
#initialize(value) ⇒ Expectation
Returns a new instance of Expectation.
9 10 11 |
# File 'lib/specifier/expectation.rb', line 9 def initialize(value) @value = value end |
Instance Method Details
#to(matcher) ⇒ Object
13 14 15 |
# File 'lib/specifier/expectation.rb', line 13 def to(matcher) raise Miss, matcher. unless matcher.match?(@value) end |