Sha256: 5f44f3a3c7ae25342fbb5fedeb01e6ab03123f10585dd16f695f88a57493e6e7

Contents?: true

Size: 1.2 KB

Versions: 22

Compression:

Stored size: 1.2 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../../../lib/poolparty/helpers/hash_printer'

describe "Hash printer" do
  before :all do
    @cloud_reference_hash = {
      :options => {:name => "dog", :keypair => "bob", :users => ["ari", "michael"]},
      :resources => {
        :file =>  [
                    {:name => "/etc/motd", :content => "Welcome to the cloud"},
                    {:name => "/etc/profile", :content => "profile info"}
                  ],
        :directory => [
                        {:name => "/var/www"}
                      ]    
      },
      :services => {
        :apache => {
          :options => {:listen => "8080"},
          :resources => {
                          :file => [
                              {:name => "/etc/apache2/apache2.conf", :template => "/absolute/path/to/template", :content => "rendered template string"}
                            ]
                        },
          :services => {}
        }
      }
    }
  end
  it "should print_to_string output a string" do
    # puts HashPrinter.print_to_string(@cloud_reference_hash)
    HashPrinter.print_to_string(@cloud_reference_hash).class.should == String
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
auser-poolparty-1.1.1 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.1.3 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.1.4 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.1.5 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.1.6 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.1.7 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.0 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.1 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.10 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.11 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.12 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.2 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.3 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.4 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.7 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.8 spec/poolparty/helpers/hash_printer_spec.rb
auser-poolparty-1.2.9 spec/poolparty/helpers/hash_printer_spec.rb
fairchild-poolparty-1.1.3 spec/poolparty/helpers/hash_printer_spec.rb
fairchild-poolparty-1.1.4 spec/poolparty/helpers/hash_printer_spec.rb
fairchild-poolparty-1.1.5 spec/poolparty/helpers/hash_printer_spec.rb