Class: Pairwise::Formatter::Cucumber

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

Instance Method Summary collapse

Constructor Details

#initialize(out) ⇒ Cucumber

Returns a new instance of Cucumber.



5
6
7
8
# File 'lib/pairwise/formatter/cucumber.rb', line 5

def initialize(out)
  @out = out
  @max = {}
end

Instance Method Details

#display(test_data, input_labels) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pairwise/formatter/cucumber.rb', line 10

def display(test_data, input_labels)
  @test_data = label_wild_cards(test_data, input_labels)
  @input_labels = input_labels

  @out.print "|"
  @input_labels.each_with_index do |label, column|
    @out.print padded_string(label, column) + "|"
  end
  @out.puts

  @test_data.each do |data|
    @out.print "|"
    data.each_with_index do |datum, column|
      @out.print padded_string(datum, column) + "|"
    end
    @out.puts
  end
end