Sha256: 467f59d43fa90636d35e73ac34e8902117e765c3feed0e9c24f99fa66b944ec7

Contents?: true

Size: 342 Bytes

Versions: 3

Compression:

Stored size: 342 Bytes

Contents

# frozen_string_literal: true
Then('the junit output file {string} should contain:') do |actual_file, text|
  actual = IO.read(current_dir + '/' + actual_file)
  actual = replace_junit_time(actual)
  expect(actual).to eq text
end

module JUnitHelper
  def replace_junit_time(s)
    s.gsub(/\d+\.\d\d+/m, '0.05')
  end
end

World(JUnitHelper)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-3.0.1 features/lib/step_definitions/junit_steps.rb
cucumber-3.0.0 features/lib/step_definitions/junit_steps.rb
cucumber-3.0.0.pre.2 features/lib/step_definitions/junit_steps.rb