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.



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_durationObject (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

#attachObject



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

#exceptionObject



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

def exception(*) end

#failedObject



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

def failed(*) end

#passedObject



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

def passed(*) end

#pendingObject



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

def pending(*) end

#skippedObject



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

def skipped(*) end

#undefinedObject



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

def undefined(*) end