spec/lib/convox/client_spec.rb in convox_installer-3.0.0 vs spec/lib/convox/client_spec.rb in convox_installer-3.0.1
- old
+ new
@@ -98,15 +98,15 @@
)
client.install_convox
end
end
- describe '#validate_convox_auth_and_write_host!' do
+ describe '#validate_convox_rack_and_write_current!' do
it 'requires the correct config vars' do
client = described_class.new
expect do
- client.validate_convox_auth_and_write_host!
+ client.validate_convox_rack_and_write_current!
end.to raise_error('aws_region is missing from the config!')
end
it 'raises an error if auth file is missing' do
client = described_class.new(
@@ -118,11 +118,11 @@
expect(File).to receive(:exist?).with(
"#{home_dir}/.convox/auth"
).and_return(false)
expect do
- client.validate_convox_auth_and_write_host!
+ client.validate_convox_rack_and_write_current!
end.to raise_error(/Could not find auth file at /)
end
it 'sets ~/.convox/host if a matching host is found in the auth file' do
expect(File).to receive(:exist?).with(
@@ -139,11 +139,11 @@
}
)
expect(client).to receive(:write_current).with(
'convox-test-697645520.us-west-2.elb.amazonaws.com'
)
- expect(client.validate_convox_auth_and_write_host!).to(
+ expect(client.validate_convox_rack_and_write_current!).to(
eq('convox-test-697645520.us-west-2.elb.amazonaws.com')
)
end
it 'raises an error if no matching host is found' do
@@ -159,11 +159,11 @@
aws_region: 'us-east-1',
stack_name: 'convox-test'
}
)
expect do
- client.validate_convox_auth_and_write_host!
+ client.validate_convox_rack_and_write_current!
end.to raise_error('Could not find matching authentication for ' \
'region: us-east-1, stack: convox-test')
end
it 'raises an error if it finds multiple matching hosts' do
@@ -180,10 +180,10 @@
aws_region: 'us-west-2',
stack_name: 'convox-test'
}
)
expect do
- client.validate_convox_auth_and_write_host!
+ client.validate_convox_rack_and_write_current!
end.to raise_error('Found multiple matching hosts for ' \
'region: us-west-2, stack: convox-test')
end
end
end