Sha256: 07f9670209e8d591001638694de01b9e77fce4e8952a48ea0d172f07c4cbe8be

Contents?: true

Size: 399 Bytes

Versions: 11

Compression:

Stored size: 399 Bytes

Contents

class Flight
  attr_reader :from, :to

  def initialize(from, to)
    @from = from
    @to = to
  end
end

ParameterType(
  name: 'flight',
  regexp: /([A-Z]{3})-([A-Z]{3})/,
  transformer: -> (from, to) { Flight.new(from, to) }
)

Given('{flight} has been delayed {int} minutes') do |flight, delay|
  expect(flight.from).to eq('LHR')
  expect(flight.to).to eq('CDG')
  expect(delay).to eq(45)
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cucumber-compatibility-kit-12.0.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-11.3.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-11.2.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-11.0.1 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-11.0.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-10.0.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-9.2.1 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-9.2.0 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-9.1.2 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-9.1.1 features/parameter-types/parameter-types.feature.rb
cucumber-compatibility-kit-9.1.0 features/parameter-types/parameter-types.feature.rb