X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/8bbb07a1bc5db944ba95fa5951ed40c3c1b968aa..febcaa4d9fbe691c63473c2129788c0dbbe5cce0:/features/support/fixtures.rb diff --git a/features/support/fixtures.rb b/features/support/fixtures.rb index 47290c7..0fa06c0 100644 --- a/features/support/fixtures.rb +++ b/features/support/fixtures.rb @@ -55,7 +55,7 @@ name: <%= name %> address: | <%= address.gsub(/^/, ' ').rstrip %> email: <%= email %> -mumbership_fee_paid_on: <%= membership_fee_paid_on %> +membership_fee_paid_on: <%= membership_fee_paid_on %> --- <%= notes %> @@ -70,6 +70,7 @@ def render_subscription_file(locals) end def new_id - new_id = Dir.glob("#{current_dir}/Membres/*.mdwn"). - collect { |f| File.basename(f).gsub(/\.mdwn$/, '').to_i }.max + 1 + max_id = Dir.glob("#{current_dir}/Membres/*.mdwn"). + collect { |f| File.basename(f).gsub(/\.mdwn$/, '').to_i }.max || 0 + max_id + 1 end