Sha256: 5664fbbe3c58f79ecf681243ad74329436972fbff9c033f29708a3c6cd98f8df

Contents?: true

Size: 817 Bytes

Versions: 15

Compression:

Stored size: 817 Bytes

Contents

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

class TestNeighborhoods < Test::Unit::TestCase
  context "Constant" do
    should "have the constant Neighborhoods" do
      PoolParty.const_get("Neighborhoods").should == PoolParty::Neighborhoods
    end
  end
  context "setting up a neighborhood" do
    should "set the schema when starting with a json string or a hash" do
      n = Neighborhoods.new({:instances => "b"})
      n.schema.nil?.should == false
      n.schema.class.should == PoolParty::Schema
    end
    should "raise an error if there started with nil" do
      lambda {Neighborhoods.new}.should raise_error
    end
    should "should not raise a fit if there ARE instances defined" do
      lambda{Neighborhoods.new({:instances => ["10.0.0.1"]})}.should_not raise_error
    end
  end
  
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
auser-poolparty-1.1.6 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.1.7 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.0 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.1 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.10 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.11 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.12 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.2 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.3 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.4 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.7 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.8 test/poolparty/poolparty/neighborhood_test.rb
auser-poolparty-1.2.9 test/poolparty/poolparty/neighborhood_test.rb
fairchild-poolparty-1.2.12 test/poolparty/poolparty/neighborhood_test.rb
poolparty-1.2.2 test/poolparty/poolparty/neighborhood_test.rb