Sha256: 1ce340b8fd59d7db9ee8668bba2a0efec8b42569c4331f7d411cbfe085a8d1f0

Contents?: true

Size: 904 Bytes

Versions: 1

Compression:

Stored size: 904 Bytes

Contents

require 'spec_helper'

describe Travis::CLI::Setup do
  example 'setup cloudcontrol' do
    run_cli('setup', 'cloudcontrol') { |i|
      i.puts('email')
      i.puts('password')
      i.puts('application')
      i.puts('deployment')
      i.puts('yes')
      i.puts('yes')}.should be_success
    stdout.should be == "cloudControl email: cloudControl password: ********\ncloudControl application: cloudControl deployment: Deploy only from rails/rails? |yes| Encrypt password key? |yes| "
    file = File.expand_path('.travis.yml', Dir.pwd.gsub!(/\/spec/, ''))
    config = YAML.load_file(file)
    
    config['deploy']['provider'].should eql('cloudcontrol')
    config['deploy']['email'].should eql('email')
    config['deploy']['deployment'].should eql('application/deployment')

    config.delete('deploy')
    yaml = config.to_yaml
    yaml.gsub! /\A---\s*\n/, ''
    File.write(file, yaml)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
travis-1.5.1 spec/cli/setup_spec.rb