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
- #attach ⇒ Object
- #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.
241 242 243 244 |
# File 'lib/cucumber/formatter/junit.rb', line 241 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.
239 240 241 |
# File 'lib/cucumber/formatter/junit.rb', line 239 def test_case_duration @test_case_duration end |
Instance Method Details
#attach ⇒ Object
262 |
# File 'lib/cucumber/formatter/junit.rb', line 262 def attach(*) end |
#duration(duration) ⇒ Object
258 259 260 |
# File 'lib/cucumber/formatter/junit.rb', line 258 def duration(duration, *) duration.tap { |dur| @test_case_duration = dur.nanoseconds / 10**9.0 } end |
#exception ⇒ Object
256 |
# File 'lib/cucumber/formatter/junit.rb', line 256 def exception(*) end |
#failed ⇒ Object
248 |
# File 'lib/cucumber/formatter/junit.rb', line 248 def failed(*) end |
#passed ⇒ Object
246 |
# File 'lib/cucumber/formatter/junit.rb', line 246 def passed(*) end |
#pending ⇒ Object
254 |
# File 'lib/cucumber/formatter/junit.rb', line 254 def pending(*) end |
#skipped ⇒ Object
252 |
# File 'lib/cucumber/formatter/junit.rb', line 252 def skipped(*) end |
#undefined ⇒ Object
250 |
# File 'lib/cucumber/formatter/junit.rb', line 250 def undefined(*) end |