Sha256: bb5d30c3dcd5fa8a7d8e3dd1b962211326e40d92ba4a1a822e68fcefa3a6a72d

Contents?: true

Size: 879 Bytes

Versions: 36

Compression:

Stored size: 879 Bytes

Contents

require 'spec_helper'
require 'dpl/provider/modulus'

describe DPL::Provider::Modulus do
  subject :provider do
    described_class.new(DummyContext.new, :api_key => 'test-token', :project_name => 'test-project')
  end

  describe :check_auth do
    it 'should require an api key' do
      provider.options.update(:api_key => nil)
      expect{ provider.check_auth }.to raise_error("must supply an api key")
    end
  end

  describe :check_app do
    it 'should require a project name' do
      provider.options.update(:project_name => nil)
      expect{ provider.check_app }.to raise_error("must supply a project name")
    end
  end

  describe :push_app do
    it 'should include the api key and project name specified' do
      provider.context.should_receive(:shell).with("MODULUS_TOKEN=test-token modulus deploy -p test-project")
      provider.push_app
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
dpl-1.6.1.travis.447.1 spec/provider/modulus_spec.rb
dpl-1.6.0 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.445.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.437.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.436.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.435.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.432.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.430.1 spec/provider/modulus_spec.rb
dpl-1.5.11.travis.414.1 spec/provider/modulus_spec.rb
dpl-1.5.10 spec/provider/modulus_spec.rb
dpl-1.5.10.travis.413.1 spec/provider/modulus_spec.rb
dpl-1.5.10.travis.402.1 spec/provider/modulus_spec.rb
dpl-1.6.0.travis.399.1 spec/provider/modulus_spec.rb
dpl-1.5.9 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.397.1 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.394.1 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.393.1 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.390.1 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.373.1 spec/provider/modulus_spec.rb
dpl-1.5.9.travis.372.1 spec/provider/modulus_spec.rb