Sha256: c11d60e06316784afd815c70faed17321266f46cfde4a2893c0f0f63beb37602

Contents?: true

Size: 982 Bytes

Versions: 21

Compression:

Stored size: 982 Bytes

Contents

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

stub_keypair_searchable_paths

class PoolTest < Test::Unit::TestCase
  context "load_from_file" do
    setup do
      @filepath = fixtures_dir/"clouds/simple_cloud.rb"
    end

    should "load the file with load_from_file on Pool" do
      PoolParty::Pool.load_from_file(@filepath)
      assert_equal PoolParty::Pool, pools["poolparty"].class
      assert_equal PoolParty::Cloud, pools["poolparty"].clouds["app"].class
      assert_equal "test_key", pools["poolparty"].clouds["app"].keypair.basename
      assert_equal "/etc/motd", pools["poolparty"].clouds["app"].files.first.name
    end
    
    should "find_and_load_default_clouds_dot_rb in Pool" do
      PoolParty::Pool.class_eval "def self.default_clouds_dot_rb_locations; [\"#{fixtures_dir/"clouds"}\"]; end"
      PoolParty::Pool.find_and_load_default_clouds_dot_rb("simple_cloud.rb")
      assert_equal PoolParty::Pool, pools["poolparty"].class
    end
  end
  
end

Version data entries

21 entries across 21 versions & 3 rubygems

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