Class: Neospec::Suite
- Inherits:
-
Object
- Object
- Neospec::Suite
- Defined in:
- lib/neospec/suite.rb
Instance Attribute Summary collapse
-
#runner ⇒ Object
Returns the value of attribute runner.
-
#specs ⇒ Object
Returns the value of attribute specs.
Instance Method Summary collapse
- #describe(description, &block) ⇒ Object
-
#initialize(runner: Neospec::Runner::Basic.new) ⇒ Suite
constructor
A new instance of Suite.
- #results ⇒ Object
- #run(logger:) ⇒ Object
Constructor Details
Instance Attribute Details
#runner ⇒ Object
Returns the value of attribute runner.
3 4 5 |
# File 'lib/neospec/suite.rb', line 3 def runner @runner end |
#specs ⇒ Object
Returns the value of attribute specs.
3 4 5 |
# File 'lib/neospec/suite.rb', line 3 def specs @specs end |
Instance Method Details
#describe(description, &block) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/neospec/suite.rb', line 14 def describe(description, &block) @specs << Neospec::Spec.new( description: description, block: block ) end |
#results ⇒ Object
10 11 12 |
# File 'lib/neospec/suite.rb', line 10 def results @specs.map(&:result) end |
#run(logger:) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/neospec/suite.rb', line 21 def run(logger:) runner.run( logger: logger, suite: self ) end |