Class: Specifier::Example
- Inherits:
-
Object
- Object
- Specifier::Example
- Defined in:
- lib/specifier/example.rb
Overview
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
Instance Method Summary collapse
- #equal(value) ⇒ Object
- #expect(value) ⇒ Object
-
#initialize(description, &block) ⇒ Example
constructor
A new instance of Example.
- #run ⇒ Object
Constructor Details
#initialize(description, &block) ⇒ Example
Returns a new instance of Example.
18 19 20 21 |
# File 'lib/specifier/example.rb', line 18 def initialize(description, &block) @description = description @block = block end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/specifier/example.rb', line 16 def description @description end |
Instance Method Details
#equal(value) ⇒ Object
27 28 29 |
# File 'lib/specifier/example.rb', line 27 def equal(value) Matcher::Equal.new(value) end |
#expect(value) ⇒ Object
23 24 25 |
# File 'lib/specifier/example.rb', line 23 def expect(value) Expectation.new(value) end |