3 Then /^le fichier "(.*)" doit avoir été créé avec les reçus$/ do |filename|
 
   4   @reciept_path = "#{ENV['NOS_OIGNONS_RECIEPTS_DIR']}/#{filename}"
 
   5   expect(File.exists?(@reciept_path)).to be_true
 
   8 Then /^il doit contenir le nom et l'adresse de (\w+), la date et le montant de la cotisation$/ do |name|
 
   9   # XXX: not nice to hard code that 10,00
 
  11   # XXX: not nice to relay that it's the last member either
 
  12   expect(@last_member['name']).to eql(name)
 
  14   content = `pdftotext #{@reciept_path} -`.gsub(/\n/, ' ')
 
  15   expect(content).to include(@last_member['name'])
 
  16   expect(content).to include(@last_member['address'])
 
  17   expect(content).to include(DateTime.strptime(@last_member['membership_fee_paid_on'], "%Y-%m-%d").strftime("%d/%m/%Y"))
 
  18   expect(content).to include(amount)