Sha256: c7251eb78e63f15d880648d72d8f5c0d21f22f48ba72f9717f04d56b31684995
Contents?: true
Size: 1.36 KB
Versions: 24
Compression:
Stored size: 1.36 KB
Contents
require 'spec_helper' describe ::SimpleDeploy::StackFormatter do include_context 'double stubbed config', :access_key => 'key', :secret_key => 'XXX', :region => 'us-west-1' before do @logger_stub = stub 'logger stub', :info => 'true', :warn => 'true' @stack_reader_mock = mock 'StackReader' SimpleDeploy::StackReader.stub(:new).and_return(@stack_reader_mock) @stack_reader_mock.stub(:attributes).and_return(:chef_repo_bucket_prefix => 'chef_repo_bp') @stack_reader_mock.stub(:outputs).and_return([{'key' => 'value'}]) @stack_reader_mock.stub(:status).and_return('green') @stack_reader_mock.stub(:events).and_return(['event1', 'event2', 'event3']) @stack_reader_mock.stub(:resources).and_return([{'StackName' => 'my_stack'}]) @stack_formatter = SimpleDeploy::StackFormatter.new(:name => 'my_stack') end after do SimpleDeploy.release_config end describe 'display' do it 'should return formatted information for the stack' do @stack_formatter.display.should == { 'attributes' => { :chef_repo_bucket_prefix => 'chef_repo_bp' }, 'status' => 'green', 'outputs' => [{'key' => 'value'}], 'events' => ['event1', 'event2', 'event3'], 'resources' => [{'StackName' => 'my_stack'}] } end end end
Version data entries
24 entries across 24 versions & 1 rubygems