Class: Cucumber::Formatter::ResultBuilder
- Defined in:
- lib/cucumber/formatter/junit.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#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.
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
#status ⇒ Object (readonly)
Returns the value of attribute status.
240 241 242 |
# File 'lib/cucumber/formatter/junit.rb', line 240 def status @status end |
#test_case_duration ⇒ Object (readonly)
Returns the value of attribute test_case_duration.
240 241 242 |
# File 'lib/cucumber/formatter/junit.rb', line 240 def test_case_duration @test_case_duration end |
Instance Method Details
#duration(duration) ⇒ Object
269 270 271 |
# File 'lib/cucumber/formatter/junit.rb', line 269 def duration(duration, *) duration.tap { |duration| @test_case_duration = duration.nanoseconds / 10 ** 9.0 } end |
#exception ⇒ Object
266 267 |
# File 'lib/cucumber/formatter/junit.rb', line 266 def exception(*) end |
#failed ⇒ Object
250 251 252 |
# File 'lib/cucumber/formatter/junit.rb', line 250 def failed @status = :failed end |
#passed ⇒ Object
246 247 248 |
# File 'lib/cucumber/formatter/junit.rb', line 246 def passed @status = :passed end |
#pending ⇒ Object
262 263 264 |
# File 'lib/cucumber/formatter/junit.rb', line 262 def pending(*) @status = :pending end |
#skipped ⇒ Object
258 259 260 |
# File 'lib/cucumber/formatter/junit.rb', line 258 def skipped @status = :skipped end |
#undefined ⇒ Object
254 255 256 |
# File 'lib/cucumber/formatter/junit.rb', line 254 def undefined @status = :undefined end |