spec/support/test_app.rb in capistrano-3.1.0 vs spec/support/test_app.rb in capistrano-3.2.0

- old
+ new

@@ -55,10 +55,16 @@ File.open(test_stage_path, 'w') do |file| file.write config end end + def append_to_deploy_file(config) + File.open(test_stage_path, 'a') do |file| + file.write config + "\n" + end + end + def prepend_to_capfile(config) current_capfile = File.read(capfile) File.open(capfile, 'w') do |file| file.write config file.write current_capfile @@ -76,13 +82,14 @@ def cap(task) run "bundle exec cap #{stage} #{task}" end def run(command) + output = nil Dir.chdir(test_app_path) do - %x[#{command}] + output = %x[#{command}] end - $?.success? + [$?.success?, output] end def stage 'test' end