Class: Flatware::Cucumber::Result
- Inherits:
-
Object
- Object
- Flatware::Cucumber::Result
- Defined in:
- lib/flatware/cucumber/result.rb
Instance Attribute Summary collapse
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#worker ⇒ Object
readonly
Returns the value of attribute worker.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(progress) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(progress) ⇒ Result
Returns a new instance of Result.
6 7 8 9 |
# File 'lib/flatware/cucumber/result.rb', line 6 def initialize(progress) @progress = progress @worker = ENV.fetch('TEST_ENV_NUMBER', 0).to_i end |
Instance Attribute Details
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
4 5 6 |
# File 'lib/flatware/cucumber/result.rb', line 4 def progress @progress end |
#worker ⇒ Object (readonly)
Returns the value of attribute worker.
4 5 6 |
# File 'lib/flatware/cucumber/result.rb', line 4 def worker @worker end |
Class Method Details
.background(status, exception) ⇒ Object
21 22 23 |
# File 'lib/flatware/cucumber/result.rb', line 21 def background(status, exception) new '', [StepResult.new(status, exception)] end |
.status(status) ⇒ Object
17 18 19 |
# File 'lib/flatware/cucumber/result.rb', line 17 def status(status) new status end |
.step(*args) ⇒ Object
12 13 14 15 |
# File 'lib/flatware/cucumber/result.rb', line 12 def step(*args) step = StepResult.new(*args) new step.progress, [step] end |