Sha256: 4834ba476110d5f2ddbb633a6cdfb3f931f28a47a0d11df9bd2eef71670b18f1

Contents?: true

Size: 992 Bytes

Versions: 10

Compression:

Stored size: 992 Bytes

Contents

require 'spec_helper'

describe SimpleDeploy do
  before do
    @logger_mock = mock 'logger mock', :info => 'true'
    @config_mock = mock 'config mock', :logger => @logger_mock, :region => 'us-west-1'
    @config_mock.stub(:artifact_cloud_formation_url).and_return('CookBooksURL')
    @config_mock.stub(:artifacts).and_return(['chef_repo', 'cookbooks', 'app'])

    options = { :config      => @config_mock,
                :environment => 'preprod',
                :main_attributes => {
                  'chef_repo_bucket_prefix' => 'test-prefix',
                  'chef_repo_domain' => 'test-domain' }
              }
    @formater = SimpleDeploy::StackAttributeFormater.new options
  end

  it 'should return updated attributes including the cloud formation url' do
    updates = @formater.updated_attributes([ { 'chef_repo' => 'test123' } ])
    updates.should == [{ 'chef_repo' => 'test123' }, { 'CookBooksURL' => 's3://test-prefix-us-west-1/test-domain/test123.tar.gz' }]
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
simple_deploy-0.6.3 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.6.2 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.6.1 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.6.0 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.6 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.5 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.4 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.3 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.2 spec/stack/stack_attribute_formater_spec.rb
simple_deploy-0.5.1 spec/stack/stack_attribute_formater_spec.rb