Sha256: 2e3e2bc48689f0dc4ead97acd57982856c56b73dfa0baf70f9aa84aaefbf79bc

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe "Hugo App" do
  before(:each) do
    mocks
  end
  
  it "should be valid" do
    
    block = lambda do
      cloud "my_cloud" do 
        balancer
        app "testapp" do 
          servers 0
        end
      end
    end
    
    lambda do
      Hugo &block
    end.should_not raise_error
  end

  it "should raise error for database block not wrapped in cloud block" do
    block = lambda do
      app "myapp" do end
    end
    
    lambda do
      Hugo &block
    end.should raise_error
  end

  it "should not raise error for database block wrapped in cloud block" do
    block = lambda do
      cloud "mycloud" do
        app "myapp" do end
      end
    end
    
    lambda do
      Hugo &block
    end.should be_true
  end
end

# describe Hugo::App do
#   before(:each) do
#     mocks
#   end
#   
# 
#   it "should create a new ec2 instance" do
#     
#     app = Hugo::App.instance
#     app.key_name "ec2-keypair"
# 
#     app.servers 1
#     app.name "mydb"
#     #app.deploy.should be_a_kind_of(Hugo::Aws::Rds)
#   end
#   
#   
# end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hugo-0.1.6 spec/lib/hugo/app_spec.rb
hugo-0.1.5 spec/lib/hugo/app_spec.rb
hugo-0.1.4 spec/lib/hugo/app_spec.rb
hugo-0.1.2 spec/lib/hugo/app_spec.rb
hugo-0.1.1 spec/lib/hugo/app_spec.rb
hugo-0.1.0 spec/lib/hugo/app_spec.rb