Class: CommandUnit::Test
- Inherits:
-
Object
- Object
- CommandUnit::Test
- Defined in:
- lib/command-unit/test.rb
Instance Attribute Summary collapse
-
#expectations ⇒ Object
readonly
Returns the value of attribute expectations.
-
#when_i_block ⇒ Object
readonly
Returns the value of attribute when_i_block.
-
#when_i_text ⇒ Object
readonly
Returns the value of attribute when_i_text.
Instance Method Summary collapse
- #add_expectation(expectation) ⇒ Object
-
#initialize(when_i_text, &when_i_block) ⇒ Test
constructor
A new instance of Test.
Constructor Details
#initialize(when_i_text, &when_i_block) ⇒ Test
Returns a new instance of Test.
4 5 6 7 8 |
# File 'lib/command-unit/test.rb', line 4 def initialize(when_i_text, &when_i_block) @when_i_text = when_i_text @when_i_block = when_i_block @expectations = [] end |
Instance Attribute Details
#expectations ⇒ Object (readonly)
Returns the value of attribute expectations.
9 10 11 |
# File 'lib/command-unit/test.rb', line 9 def expectations @expectations end |
#when_i_block ⇒ Object (readonly)
Returns the value of attribute when_i_block.
9 10 11 |
# File 'lib/command-unit/test.rb', line 9 def when_i_block @when_i_block end |
#when_i_text ⇒ Object (readonly)
Returns the value of attribute when_i_text.
9 10 11 |
# File 'lib/command-unit/test.rb', line 9 def when_i_text @when_i_text end |
Instance Method Details
#add_expectation(expectation) ⇒ Object
10 11 12 |
# File 'lib/command-unit/test.rb', line 10 def add_expectation(expectation) @expectations.push expectation end |