spec/provider/deis_spec.rb in dpl-1.7.8.travis.651.1 vs spec/provider/deis_spec.rb in dpl-1.7.8.travis.653.1

- old
+ new

@@ -1,14 +1,33 @@ require 'spec_helper' require 'dpl/provider/deis' describe DPL::Provider::Deis do + let(:options) do + { + :app => 'example', + :key_name => 'key', + :controller => 'deis.deisapps.com', + :username => 'travis', + :password => 'secret' + } + end + subject :provider do - described_class.new(DummyContext.new, :app => 'example', - :key_name => 'key', - :controller => 'deis.deisapps.com', - :username => 'travis', - :password => 'secret') + described_class.new(DummyContext.new, options) + end + + describe "#install_deploy_dependencies" do + example 'without version specified' do + expect(provider.class).to receive(:pip).with('deis', 'deis', nil) + provider.install_deploy_dependencies + end + + example 'with version specified' do + options[:cli_version] = '1.0' + expect(provider.class).to receive(:pip).with('deis', 'deis', '1.0') + provider.install_deploy_dependencies + end end describe "#needs_key?" do example do expect(provider.needs_key?).to eq(true)