features/step_definitions/git_steps.rb in stove-1.1.2 vs features/step_definitions/git_steps.rb in stove-2.0.0.beta.1

- old
+ new

@@ -1,23 +1,26 @@ Given /^the remote repository has additional commits/ do - Dir.chdir(fake_git_remote) do - shellout 'touch myfile.txt' - git 'add myfile.txt' - git 'commit -m "Add a new file"' - end + cmd = [ + 'cd "' + fake_git_remote + '"', + 'touch myfile.txt', + 'git add --force myfile.txt', + 'git commit --message "Add new file"', + ].join(' && ') + + %x|#{cmd}| end -Then /^the git remote will( not)? have the commit "(.+)"$/ do |negate, message| +Then /^the git remote should( not)? have the commit "(.+)"$/ do |negate, message| commits = git_commits(fake_git_remote) if negate expect(commits).to_not include(message) else expect(commits).to include(message) end end -Then /^the git remote will( not)? have the tag "(.+)"$/ do |negate, tag| +Then /^the git remote should( not)? have the tag "(.+)"$/ do |negate, tag| tags = git_tags(fake_git_remote) if negate expect(tags).to_not include(tag) else