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