]> nos-oignons.net Git - gestion-adh.git/blobdiff - features/support/fixtures.rb
Ajout d'un peu de logs
[gestion-adh.git] / features / support / fixtures.rb
index 42d46ee21a7c33dfbf0df359ca7faf4960f37afd..723f3516f06366d42a6a552801638521c9b72aba 100644 (file)
@@ -35,10 +35,6 @@ BASE_MEMBERS = YAML.load(<<END_OF_YAML)
     Il vient de `whois cogent.fr`.
 000002:
   name: Sylvain Dufier
-  address: |
-    ORANGE FRANCE
-    13, rue de Javel
-    75015 Paris
   email: sylvain.dufier@orange-ftgroup.com
   joined_on: 2013-05-20
   membership_fee_paid_on: 2013-05-29
@@ -72,8 +68,10 @@ END_OF_YAML
 MEMBER_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
 ---
 name: <%= name %>
+<% unless address.nil? -%>
 address: |
 <%= address.gsub(/^/, '  ').rstrip %>
+<% end -%>
 email: <%= email %>
 joined_on: <%= joined_on %>
 membership_fee_paid_on: <%= membership_fee_paid_on %>
@@ -88,7 +86,7 @@ def member_filename_for_id(id)
 end
 
 def render_member_file(locals)
-  ERB.new(MEMBER_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
+  ERB.new(MEMBER_FILE_TEMPLATE, trim_mode: '-').result(OpenStruct.new(locals).instance_eval { binding })
 end
 
 def new_id