Sha256: 35f1b9b100f93e58d1488c240ae1a4e9878f4a7117fd7693582a717400abd716

Contents?: true

Size: 1005 Bytes

Versions: 428

Compression:

Stored size: 1005 Bytes

Contents

require 'spec_helper'
require 'dpl/provider/appfog'

describe DPL::Provider::Appfog do
  subject :provider do
    described_class.new(DummyContext.new, :email => 'blah@foo.com', :password => 'bar')
  end

  describe "#check_auth" do
    example do
      expect(provider.context).to receive(:shell).with("af login --email=blah@foo.com --password=bar")
      provider.check_auth
    end
  end

  describe "#needs_key?" do
    example do
      expect(provider.needs_key?).to eq(false)
    end
  end

  describe "#push_app" do
    example "Without :app" do
      expect(provider.context).to receive(:shell).with("af update #{File.basename(Dir.getwd)}")
      expect(provider.context).to receive(:shell).with("af logout")
      provider.push_app
    end
    example "With :app" do
      provider.options.update(:app => 'test')
      expect(provider.context).to receive(:shell).with("af update test")
      expect(provider.context).to receive(:shell).with("af logout")
      provider.push_app
    end
  end
end

Version data entries

428 entries across 428 versions & 2 rubygems

Version Path
dpl-1.6.6.travis.521.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.518.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.512.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.509.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.508.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.507.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.500.1 spec/provider/appfog_spec.rb
dpl-1.6.6.travis.498.1 spec/provider/appfog_spec.rb