X-Git-Url: https://nos-oignons.fr/gitweb/gestion-adh.git/blobdiff_plain/a7923e253aaa43510a7297a50a9db90ef976ebb3..635887918e9c4b5c8278e4a45958420175a4024a:/features/step_definitions/git.rb diff --git a/features/step_definitions/git.rb b/features/step_definitions/git.rb new file mode 100644 index 0000000..30d6e7c --- /dev/null +++ b/features/step_definitions/git.rb @@ -0,0 +1,25 @@ +require 'fileutils' + +Given /^un clone du Git contenant les adhésions$/ do + # Create main repository + create_dir 'main' + cd 'main' + run_simple 'git init' + create_dir 'Membres' + BASE_SUBSCRIPTIONS.each_pair do |number, data| + file = subscription_filename_for_id(number) + write_file file, render_subscription_file(data) + run_simple "git add #{file}" + end + run_simple 'git commit -m "Initial data set from fixtures"' + cd '..' + + # Clone it now + run_simple 'git clone main clone' + cd 'clone' +end + +When /je fait un `commit` du nouveau fichier$/ do + run_simple "git add #{@file}" + run_simple "git commit #{@file} -m 'new file'" +end