Class: RainforestRubyRuntime::Test
- Inherits:
-
Object
- Object
- RainforestRubyRuntime::Test
- Defined in:
- lib/rainforest_ruby_runtime/test.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id:, title:, callback:, &block) ⇒ Test
constructor
A new instance of Test.
- #run ⇒ Object
Constructor Details
#initialize(id:, title:, callback:, &block) ⇒ Test
Returns a new instance of Test.
5 6 7 8 9 10 11 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 5 def initialize(id: , title: , callback: , &block) @id = id @title = title @steps = [] @block = block @callback = callback end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 3 def id @id end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
3 4 5 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 3 def steps @steps end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 3 def title @title end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 13 def run @callback.before_test(self) @block.call @callback.after_test(self) end |