Sha256: 984f618bd440caf32467638dfba1914ea0751df8a4ef6b22d42c3c2764dadd2f

Contents?: true

Size: 1.91 KB

Versions: 14

Compression:

Stored size: 1.91 KB

Contents

Then /^I should see the current version of bard$/ do
  version = File.read("#{ROOT}/VERSION").chomp
  @stdout.should =~ /bard\s+\(#{Regexp.escape(version)}\)/
end

Then /^I should see the current version of git$/ do
  version = `git --version`[/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/]
  @stdout.should =~ /git\s+\(#{Regexp.escape(version)}\)/
end

Then /^I should see the current version of rubygems$/ do
  version = `gem --version`.chomp
  @stdout.should =~ /rubygems\s+\(#{Regexp.escape(version)}\)/
end

Then /^I should see the current version of ruby$/ do
  version = `ruby --version`[/[0-9]+\.[0-9]+\.[0-9]+/]
  @stdout.should =~ /ruby\s+\(#{Regexp.escape(version)}\)/
end

Given /^"([^\"]*)" is missing$/ do |file|
  type "rm #{file}"
end

Given /^the database is missing$/ do
  File.open "config/database.yml", "w" do |f|
    f.puts <<-DB
development:
  adapter: mysql
  username: root
  password:
  database: bad_bad_bad
  socket: /var/run/mysqld/mysqld.sock
DB
  end
end

Given /^the submodule is missing$/ do
  type "rm -rf submodule"
  type "mkdir submodule"
end

Given /^the submodule has a detached head$/ do
  Dir.chdir "submodule" do
    type "git checkout `git rev-parse HEAD`"
  end
end

Given /^my "([^\"]*)" environment variable is "([^\"]*)"$/ do |key, value|
  @env ||= Hash.new
  @env[key] = value
end

Given /^there is no git hook on the staging server$/ do
  Dir.chdir "#{ROOT}/tmp/origin" do
    type "rm .git/hooks/post-receive"
  end
end

Given /^the git hook on the staging server is not executable$/ do
  Dir.chdir "#{ROOT}/tmp/origin" do
    type "chmod 664 .git/hooks/post-receive"
  end
end

Given /^the git hook on the staging server is bad$/ do
  Dir.chdir "#{ROOT}/tmp/origin" do
    type "echo 'bad' > .git/hooks/post-receive"
  end
end

Given /^the staging server git config for receive.denyCurrentBranch is not "ignore"$/ do
  Dir.chdir "#{ROOT}/tmp/origin" do
    type "git config --unset receive.denyCurrentBranch"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bard-0.6.7 features/step_definitions/check_steps.rb
bard-0.6.6 features/step_definitions/check_steps.rb
bard-0.6.5 features/step_definitions/check_steps.rb
bard-0.6.4 features/step_definitions/check_steps.rb
bard-0.6.3 features/step_definitions/check_steps.rb
bard-0.6.2 features/step_definitions/check_steps.rb
bard-0.6.1 features/step_definitions/check_steps.rb
bard-0.6.0 features/step_definitions/check_steps.rb
bard-0.5.8 features/step_definitions/check_steps.rb
bard-0.5.7 features/step_definitions/check_steps.rb
bard-0.5.6 features/step_definitions/check_steps.rb
bard-0.5.5 features/step_definitions/check_steps.rb
bard-0.5.4 features/step_definitions/check_steps.rb
bard-0.5.3 features/step_definitions/check_steps.rb