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.48.travis.2486.5 spec/provider/appfog_spec.rb
dpl-1.8.47 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2485.5 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2484.5 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2483.5 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2459.3 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2458.3 spec/provider/appfog_spec.rb
dpl-1.8.46 spec/provider/appfog_spec.rb
dpl-1.8.47.travis.2456.5 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2455.5 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2454.5 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2451.5 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2449.5 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2444.5 spec/provider/appfog_spec.rb
dpl-1.8.45 spec/provider/appfog_spec.rb
dpl-1.8.46.travis.2418.5 spec/provider/appfog_spec.rb
dpl-1.8.45.travis.2417.5 spec/provider/appfog_spec.rb
dpl-1.8.44 spec/provider/appfog_spec.rb
dpl-1.8.45.travis.2398.5 spec/provider/appfog_spec.rb
dpl-1.8.44.travis.2397.5 spec/provider/appfog_spec.rb