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

Returns a new instance of ResultBuilder.


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

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


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

def test_case_duration
  @test_case_duration
end

Instance Method Details

#attachObject


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

def attach(*) end

#duration(duration) ⇒ Object


255
256
257
# File 'lib/cucumber/formatter/junit.rb', line 255

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

#exceptionObject


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

def exception(*) end

#failedObject


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

def failed(*) end

#passedObject


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

def passed(*) end

#pendingObject


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

def pending(*) end

#skippedObject


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

def skipped(*) end

#undefinedObject


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

def undefined(*) end