1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Update assertions for 'git:check' test scenario

Capistrano 'git:check' task executes a `git ls-remote -h #{repo_url}`
command to check if remote repo is accessible. If successful, command
output is a list of references and their SHAs.

Task should be successful and we're pretty sure remote repo will have a
`master` reference, so that's what we're asserting.

We're NOT asserting:
 * repo references other than master - likely to change
 * reference SHAs - will definitely change
This commit is contained in:
Bruno Sutic 2014-04-25 22:03:22 +02:00 committed by Lee Hambley
parent 2860ad22ac
commit a91d4eef0c
4 changed files with 5 additions and 2 deletions

View file

@ -73,6 +73,7 @@ Breaking Changes:
* Improved the output of `cap --help`. (@mbrictson)
* Cucumber suite now runs on the latest version of Vagrant (@tpett)
* The `ask` method now supports the `echo: false` option. (@mbrictson, @kaikuchn)
* Cucumber scenario improvements (@bruno-)
* Added suggestion to Capfile to use 'capistrano-passenger' gem, replacing suggestion in config/deploy.rb to re-implement 'deploy:restart' (@betesh)
* Updated svn fetch_revision method to use `svnversion`

View file

@ -6,7 +6,8 @@ Feature: Deploy
Scenario: Creating the repo
When I run cap "git:check"
Then references in the remote repo are listed
Then the task is successful
And references in the remote repo are listed
Scenario: Creating the directory structure
When I run cap "deploy:check:directories"

View file

@ -1,4 +1,5 @@
Then(/^references in the remote repo are listed$/) do
expect(@output).to include('refs/heads/master')
end
Then(/^the shared path is created$/) do

View file

@ -1,5 +1,5 @@
When(/^I run cap "(.*?)"$/) do |task|
@success = TestApp.cap(task)
@success, @output = TestApp.cap(task)
end
When(/^I run cap "(.*?)" as part of a release$/) do |task|