Sha256: 825ad38577d66176602ffdce8bb54c086a12d6246fba850ba00accd351a67eab

Contents?: true

Size: 573 Bytes

Versions: 9

Compression:

Stored size: 573 Bytes

Contents

Given /^I mock out git commands$/ do
  Engineyard::Recipes::GitCmd.test_mode = true
end

Then /^git command "([^"]*)" is run$/ do |command|
  command.gsub!(/^git\s+/, '') # don't test for git command portion
  in_tmp_folder do
    File.should be_exists('git.log')
    File.read('git.log').should =~ /^#{command}$/
  end
end


Then /^git command "([^"]*)" is not run$/ do |command|
  command.gsub!(/^git\s+/, '') # don't test for git command portion
  in_tmp_folder do
    if File.exists? 'git.log'
      File.read('git.log').should_not =~ /^#{command}$/
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
engineyard-recipes-0.5.0 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.4.0 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.3.2 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.3.2.pre features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.3.0 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.2.0 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.2.0.pre3 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.2.0.pre2 features/step_definitions/mock_git_steps.rb
engineyard-recipes-0.2.0.pre1 features/step_definitions/mock_git_steps.rb