Sha256: 032fa5da33e725f9c869654f2af03ffdd1fc72a4f2f24d2c7ac42f487c295104

Contents?: true

Size: 946 Bytes

Versions: 20

Compression:

Stored size: 946 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../test_helper"

PoolParty::Resource.define_resource_methods

class BaseTest < Test::Unit::TestCase
  
  def test_have_compile_method_name
    assert DependencyResolvers::Base.respond_to?(:compile_method_name)
    assert_equal :print_to_base, DependencyResolvers::Base.compile_method_name
  end
  def test_have_a_list_of_all_the_DependencyResolvers
    assert DependencyResolvers.all.include?(DependencyResolvers::Chef)
  end
  
  
  def setup
    clear!
    @base = DependencyResolvers::Chef
    @pool = pool "dummy test cloud" do
      cloud "duh" do
        file "/etc/motd", :content => "piper"
      end
    end
    @cloud = @pool.clouds["duh"]
  end
  
  def test_compile_base
      str =<<-EOE
template "/etc/motd" do
  source "/etc/motd.erb"
  action :create
  backup 5
  mode 0644
  owner "root"
end
      EOE
      
    assert_equal str, @base.compile_to(@cloud.resources, test_dir)
  end
  
  
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.1 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.10 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.11 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.12 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.13 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.2 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.3 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.4 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.5 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.6 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.7 test/lib/dependency_resolvers/base_test.rb
auser-poolparty-1.3.8 test/lib/dependency_resolvers/base_test.rb
fairchild-poolparty-1.3.5 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.8 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.7 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.6 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.4 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.3 test/lib/dependency_resolvers/base_test.rb
poolparty-1.3.1 test/lib/dependency_resolvers/base_test.rb