Class: Cucumber::Formatter::ResultBuilder
- Inherits:
-
Object
- Object
- Cucumber::Formatter::ResultBuilder
- Defined in:
- lib/cucumber/formatter/junit.rb
Instance Attribute Summary collapse
-
#test_case_duration ⇒ Object
readonly
Returns the value of attribute test_case_duration.
Instance Method Summary collapse
- #duration(duration) ⇒ Object
- #exception ⇒ Object
- #failed ⇒ Object
-
#initialize(result) ⇒ ResultBuilder
constructor
A new instance of ResultBuilder.
- #passed ⇒ Object
- #pending ⇒ Object
- #skipped ⇒ Object
- #undefined ⇒ Object
Constructor Details
#initialize(result) ⇒ ResultBuilder
Returns a new instance of ResultBuilder.
217 218 219 220 |
# File 'lib/cucumber/formatter/junit.rb', line 217 def initialize(result) @test_case_duration = 0 result.describe_to(self) end |
Instance Attribute Details
#test_case_duration ⇒ Object (readonly)
Returns the value of attribute test_case_duration.
216 217 218 |
# File 'lib/cucumber/formatter/junit.rb', line 216 def test_case_duration @test_case_duration end |
Instance Method Details
#duration(duration) ⇒ Object
234 235 236 |
# File 'lib/cucumber/formatter/junit.rb', line 234 def duration(duration, *) duration.tap { |duration| @test_case_duration = duration.nanoseconds / 10**9.0 } end |
#exception ⇒ Object
232 |
# File 'lib/cucumber/formatter/junit.rb', line 232 def exception(*) end |
#failed ⇒ Object
224 |
# File 'lib/cucumber/formatter/junit.rb', line 224 def failed(*) end |
#passed ⇒ Object
222 |
# File 'lib/cucumber/formatter/junit.rb', line 222 def passed(*) end |
#pending ⇒ Object
230 |
# File 'lib/cucumber/formatter/junit.rb', line 230 def pending(*) end |
#skipped ⇒ Object
228 |
# File 'lib/cucumber/formatter/junit.rb', line 228 def skipped(*) end |
#undefined ⇒ Object
226 |
# File 'lib/cucumber/formatter/junit.rb', line 226 def undefined(*) end |