1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
capistrano/features/step_definitions/cap_commands.rb
Matt Brictson ba8115a8f7
Allow cap to be run within subdir and still work
Much like rake can find its Rakefile even when run in a subdirectory,
cap can now find its Capfile. Since cap is built on top of rake, this
was really just restoring default behavior that was accidentally
overridden.

Also add a feature test to ensure it works.
2017-03-06 07:33:47 -08:00

15 lines
414 B
Ruby

When(/^I run cap "(.*?)"$/) do |task|
@success, @output = TestApp.cap(task)
end
When(/^I run cap "(.*?)" within the "(.*?)" directory$/) do |task, directory|
@success, @output = TestApp.cap(task, directory)
end
When(/^I run cap "(.*?)" as part of a release$/) do |task|
TestApp.cap("deploy:new_release_path #{task}")
end
When(/^I run "(.*?)"$/) do |command|
@success, @output = TestApp.run(command)
end