Sha256: 7bc9e498b3ced48b1f11297b3b394d1f8d11c9e3945c8f436d010aaf8d111e24
Contents?: true
Size: 965 Bytes
Versions: 2
Compression:
Stored size: 965 Bytes
Contents
require 'spec_helper' describe Shuttle::Target do describe '#connection' do subject do Shuttle::Target.new( :host => 'host.com', :user => 'user', :password => 'password' ) end it 'returns a new ssh session connection' do subject.connection.should be_a Net::SSH::Session end end describe '#validate!' do subject { Shuttle::Target.new(attributes) } context 'with valid attributes' do let(:attributes) do {:host => 'host.com', :user => 'user', :deploy_to => '/home'} end it 'does not raise errors' do expect { subject.validate! }.not_to raise_error end end context 'with incomplete attributes' do let(:attributes) do {:host => 'host.com', :user => 'user'} end it 'raises error' do expect { subject.validate! }.to raise_error Shuttle::ConfigError, "Deploy path required" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shuttle-deploy-0.2.0.beta2 | spec/target_spec.rb |
shuttle-deploy-0.2.0.beta1 | spec/target_spec.rb |