Method: QAT::Formatter::Scenario::Name#scenario_name

Defined in:
lib/qat/formatter/scenario/name.rb

#scenario_nameObject

Since:

  • 0.1.0



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/qat/formatter/scenario/name.rb', line 33

def scenario_name
  if @to_file
    if @scenarios.values.include?(@scenario[:name])
      file_colon_line = "#{@current_feature[:uri]}:#{@scenario[:line]}"
      unless @scenarios.keys.include?(file_colon_line)
        @repeated[@scenario[:name]] ||= []
        @repeated[@scenario[:name]] << "#{@current_feature[:uri]}:#{@scenario[:line]}"
      end
    end
    file_colon_line             = "#{@current_feature[:uri]}:#{@scenario[:line]}"
    @scenarios[file_colon_line] = @scenario[:name]
  else
    Kernel.puts "#{@scenario[:name]}: #{file_colon_line}"
  end
end