Class: Cucumber::Formatter::NameBuilder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_case) ⇒ NameBuilder

Returns a new instance of NameBuilder.



211
212
213
# File 'lib/cucumber/formatter/junit.rb', line 211

def initialize(test_case)
  test_case.describe_source_to self
end

Instance Attribute Details

#name_suffixObject (readonly)

Returns the value of attribute name_suffix.



209
210
211
# File 'lib/cucumber/formatter/junit.rb', line 209

def name_suffix
  @name_suffix
end

#outline_nameObject (readonly)

Returns the value of attribute outline_name.



209
210
211
# File 'lib/cucumber/formatter/junit.rb', line 209

def outline_name
  @outline_name
end

#row_nameObject (readonly)

Returns the value of attribute row_name.



209
210
211
# File 'lib/cucumber/formatter/junit.rb', line 209

def row_name
  @row_name
end

Instance Method Details

#examples_tableObject



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

def examples_table(*)
  self
end

#examples_table_row(row) ⇒ Object



232
233
234
235
236
# File 'lib/cucumber/formatter/junit.rb', line 232

def examples_table_row(row)
  @row_name = '| ' + row.values.join(' | ') + ' |'
  @name_suffix = " (outline example : #{@row_name})"
  self
end

#featureObject



215
216
217
# File 'lib/cucumber/formatter/junit.rb', line 215

def feature(*)
  self
end

#scenarioObject



219
220
221
# File 'lib/cucumber/formatter/junit.rb', line 219

def scenario(*)
  self
end

#scenario_outline(outline) ⇒ Object



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

def scenario_outline(outline)
  @outline_name = outline.name
  self
end