1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
capistrano/features/step_definitions/setup.rb
seenmyfate 44d07c4b82 Support Git submodules
An alternative approach to #822 - this allows the setting of a single
`git_strategy` variable which can be set to `:archive` (the default, as
it is the current functionality) or `:clone` which includes the
`--recursive` flag in order to support submodules.
2013-12-09 13:26:30 +00:00

42 lines
1.1 KiB
Ruby

Given(/^a test app with the default configuration$/) do
TestApp.install
end
Given(/^a test app with git clone configuration$/) do
TestApp.install('set :git_strategy, :clone')
end
Given(/^servers with the roles app and web$/) do
vagrant_cli_command('up')
end
Given(/^a required file$/) do
end
Given(/^that file exists$/) do
run_vagrant_command("touch #{TestApp.linked_file}")
end
Given(/^the file does not exist$/) do
pending
file = TestApp.linked_file
run_vagrant_command("[ -f #{file} ] && rm #{file}")
end
Given(/^a custom task to generate a file$/) do
TestApp.copy_task_to_test_app('spec/support/tasks/database.cap')
end
Given(/^the configuration is in a custom location$/) do
TestApp.move_configuration_to_custom_location('app')
end
Given(/^a custom task that will simulate a failure$/) do
safely_remove_file(TestApp.shared_path.join('failed'))
TestApp.copy_task_to_test_app('spec/support/tasks/fail.cap')
end
Given(/^a custom task to run in the event of a failure$/) do
safely_remove_file(TestApp.shared_path.join('failed'))
TestApp.copy_task_to_test_app('spec/support/tasks/failed.cap')
end