From: Lunar <lunar@anargeek.net>
Date: Fri, 31 May 2013 20:59:14 +0000 (+0200)
Subject: Next step in pre-commit hook implementation
X-Git-Url: https://www.nos-oignons.net/gitweb/gestion-adh.git/commitdiff_plain/22835e20205db083fe17616f870adecfd6911e2c

Next step in pre-commit hook implementation
---

diff --git a/features/pre-commit-hook.feature b/features/pre-commit-hook.feature
index c388308..6d6707a 100644
--- a/features/pre-commit-hook.feature
+++ b/features/pre-commit-hook.feature
@@ -34,3 +34,8 @@ Fonctionnalité: pre-commit hook Git
     Lorsque j'ajoute une fiche sans email
     Et que je fais un `commit` du nouveau fichier
     Alors je dois voir comme erreur "pas le bon format"
+
+  Scénario: Commit d'une fiche sans nom
+    Lorsque j'ajoute une fiche sans nom
+    Et que je fais un `commit` du nouveau fichier
+    Alors je dois voir comme erreur "pas le bon format"
diff --git a/features/step_definitions/subscriptions.rb b/features/step_definitions/subscriptions.rb
index 2c07a72..4c20ddc 100644
--- a/features/step_definitions/subscriptions.rb
+++ b/features/step_definitions/subscriptions.rb
@@ -36,3 +36,16 @@ When /^j'ajoute une fiche sans email$/ do
     ---
   EOF
 end
+
+When /^j'ajoute une fiche sans nom$/ do
+  @file = subscription_filename_for_id(new_id)
+  write_file @file, <<-EOF.gsub(/^    /, '')
+    ---
+    email: joe@example.org
+    address: |
+      21 Jump Street
+      42000 Synthé
+    membership_fee_paid_on: 2013-02-20
+    ---
+  EOF
+end