Class: Smartest::SuiteRun
- Inherits:
-
Object
- Object
- Smartest::SuiteRun
- Defined in:
- lib/smartest/suite_run.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(&block) ⇒ SuiteRun
constructor
A new instance of SuiteRun.
- #ran? ⇒ Boolean
- #run ⇒ Object
Constructor Details
#initialize(&block) ⇒ SuiteRun
Returns a new instance of SuiteRun.
7 8 9 10 11 |
# File 'lib/smartest/suite_run.rb', line 7 def initialize(&block) @block = block @ran = false @result = nil end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
5 6 7 |
# File 'lib/smartest/suite_run.rb', line 5 def result @result end |
Instance Method Details
#ran? ⇒ Boolean
20 21 22 |
# File 'lib/smartest/suite_run.rb', line 20 def ran? @ran end |
#run ⇒ Object
13 14 15 16 17 18 |
# File 'lib/smartest/suite_run.rb', line 13 def run raise AroundSuiteRunError, "around_suite hook called suite.run more than once" if ran? @ran = true @result = @block.call end |