Class: Cucumber::Formatter::ResultBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/junit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ ResultBuilder


223
224
225
226
# File 'lib/cucumber/formatter/junit.rb', line 223

def initialize(result)
  @test_case_duration = 0
  result.describe_to(self)
end

Instance Attribute Details

#test_case_durationObject (readonly)

Returns the value of attribute test_case_duration


222
223
224
# File 'lib/cucumber/formatter/junit.rb', line 222

def test_case_duration
  @test_case_duration
end

Instance Method Details

#duration(duration) ⇒ Object


240
241
242
# File 'lib/cucumber/formatter/junit.rb', line 240

def duration(duration, *)
  duration.tap { |duration| @test_case_duration = duration.nanoseconds / 10**9.0 }
end

#exceptionObject


238
# File 'lib/cucumber/formatter/junit.rb', line 238

def exception(*) end

#failedObject


230
# File 'lib/cucumber/formatter/junit.rb', line 230

def failed(*) end

#passedObject


228
# File 'lib/cucumber/formatter/junit.rb', line 228

def passed(*) end

#pendingObject


236
# File 'lib/cucumber/formatter/junit.rb', line 236

def pending(*) end

#skippedObject


234
# File 'lib/cucumber/formatter/junit.rb', line 234

def skipped(*) end

#undefinedObject


232
# File 'lib/cucumber/formatter/junit.rb', line 232

def undefined(*) end