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.8.35.travis.2098.5 spec/provider/appfog_spec.rb
dpl-1.8.35.travis.2090.5 spec/provider/appfog_spec.rb
dpl-1.8.34.travis.2089.5 spec/provider/appfog_spec.rb
dpl-1.8.34 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.2049.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.2048.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.2043.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.2031.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.2025.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.1999.5 spec/provider/appfog_spec.rb
dpl-1.8.33.travis.1976.5 spec/provider/appfog_spec.rb
dpl-1.8.32 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1958.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1957.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1956.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1955.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1950.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1949.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1935.5 spec/provider/appfog_spec.rb
dpl-1.8.32.travis.1901.6 spec/provider/appfog_spec.rb