Sha256: 81ac4b2a0cd9f225dd9738d4645e06f725b5b67e2e74298638a8422c80bba186

Contents?: true

Size: 955 Bytes

Versions: 3

Compression:

Stored size: 955 Bytes

Contents

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

class TestCloudDsl < Test::Unit::TestCase
  context "enabling and disabling" do
    setup do
      reset!
      @cloud = cloud :test_cloud_dsl
    end    
    should "not have an option set for hyper_drive" do
      @cloud.dsl_options[:hyper_drive].should == nil
    end

    should "set the option to :enabled when enabled" do
      @cloud.enable :hyper_drive
      @cloud.dsl_options[:hyper_drive].should == :enabled
    end

    should "set the option to disabled when disabled" do
      @cloud.disable :hyper_drive
      @cloud.dsl_options[:hyper_drive].should == :disabled
    end
    
    should "be able to check if they are enabled" do
      @cloud.enable :hyper_drive
      @cloud.enabled?(:hyper_drive).should == true
    end
    should "be able to check that they are disabled" do
      @cloud.disable :hyper_drive
      @cloud.enabled?(:hyper_drive).should == false
    end
  end
  
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
auser-poolparty-1.1.4 test/poolparty/modules/cloud_dsl_test.rb
auser-poolparty-1.1.5 test/poolparty/modules/cloud_dsl_test.rb
fairchild-poolparty-1.1.4 test/poolparty/modules/cloud_dsl_test.rb