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

28 lines
451 B
Ruby
Raw Normal View History

2013-06-14 12:09:32 -04:00
module TestApp
def create_test_app
FileUtils.rm_rf(test_app_path)
FileUtils.mkdir(test_app_path)
File.open(gemfile, 'w+') do |file|
file.write "gem 'capistrano', path: '#{path_to_cap}'"
end
Dir.chdir(test_app_path) do
%x[bundle]
end
end
def test_app_path
Pathname.new('/tmp/test_app')
end
def path_to_cap
File.expand_path('.')
end
def gemfile
test_app_path.join('Gemfile')
end
end