Sha256: 8a0790b31767c4a14912dd30791d5e9421a27fd7077500a6382546063a2145e2

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'
require 'heirloom/cli'

describe Heirloom do

  before do
    @attributes = { 'id'                        => '123',
                    'another_data'              => 'more_data',
                    'built_at'                  => 'today',
                    'built_by'                  => 'me',
                    'bucket_prefix'             => 'bp',
                    'us-west-1-s3-url'          => 's3',
                    'us-west-1-http-url'        => 'http',
                    'us-west-1-https-url'       => 'https',
                    'us-west-1-permissions'     => 'rickybobby:full-control',
                    'us-west-2-permissions'     => 'rickybobby:full-control' }
  end

  it "should remove reserved / endpoint attribs" do
    formatter = Heirloom::CLI::Formatter::Show.new
    formatter.format(:attributes => @attributes).
              should_not match 'bucket_prefix|us-west-1-s3-url'
  end

  it "should format the id output correctly" do
    formatter = Heirloom::CLI::Formatter::Show.new
    formatter.format(:attributes => @attributes).
              should == "id           : 123\nanother_data : more_data"
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
heirloom-0.12.7 spec/cli/formatter/show_spec.rb
heirloom-0.12.5 spec/cli/formatter/show_spec.rb
heirloom-0.12.4 spec/cli/formatter/show_spec.rb
heirloom-0.12.3 spec/cli/formatter/show_spec.rb
heirloom-0.12.2 spec/cli/formatter/show_spec.rb
heirloom-0.12.1 spec/cli/formatter/show_spec.rb
heirloom-0.12.0 spec/cli/formatter/show_spec.rb
heirloom-0.11.2 spec/cli/formatter/show_spec.rb
heirloom-0.11.1 spec/cli/formatter/show_spec.rb
heirloom-0.11.0 spec/cli/formatter/show_spec.rb
heirloom-0.11.0.beta.2 spec/cli/formatter/show_spec.rb
heirloom-0.11.0.beta.1 spec/cli/formatter/show_spec.rb