features/step_definitions/bookinggit_steps.rb in bookingit-0.0.1 vs features/step_definitions/bookinggit_steps.rb in bookingit-0.1.0
- old
+ new
@@ -22,5 +22,23 @@
file.puts string
end
end
end
+Given(/^a git repo "(.*?)" in "(.*?)" containing the file "(.*?)" and a tag "(.*?)"$/) do |repo_name, repo_basedir, file_name, tag_name|
+ FileUtils.chdir "tmp/aruba" do
+ FileUtils.mkdir repo_basedir
+ @dirs_created << repo_basedir
+ FileUtils.chdir repo_basedir do
+ FileUtils.mkdir repo_name
+ FileUtils.chdir repo_name do
+ File.open(file_name,'w') do |file|
+ file.puts "Some stuff and whatnot"
+ end
+ system "git init"
+ system "git add #{file_name}"
+ system "git commit -m 'initial'"
+ system "git tag #{tag_name}"
+ end
+ end
+ end
+end