Sha256: 80487f0980963cfc1dc9b6095d5a6cd549731558d73ed74ecb51a44374cc6bef

Contents?: true

Size: 1.83 KB

Versions: 17

Compression:

Stored size: 1.83 KB

Contents

# require File.dirname(__FILE__) + '/../spec_helper'
# 
# include PoolParty::Resources
# 
# class TestClass
#   include PoolParty::Resources
# end
# describe "Remote Instance" do
#   before(:each) do
#     Kernel.stub!(:system).and_return true
#   end
#   describe "wrapped" do
#     before(:each) do
#       @tc = TestClass.new      
#       @cloud = MyOpenStruct.new(:keypair => "keys", :remote_keypair_path => "/keypair_path", :name => "cloudcloud")
#       @cloud.stub!(:is_a?).with(PoolParty::Cloud::Cloud).and_return true
#       @tc.stub!(:parent).and_return @cloud
#       
#       @options = {:name => "deploydirectory", :from => ::File.dirname(__FILE__), :to => "/var/www/deploydirectory", :testing => false}
#     end
#     it "should be a string" do
#       @tc.has_deploydirectory(@options).to_string.should =~ /exec \{/
#     end
#     it "should included the flushed out options" do
#       @tc.has_deploydirectory(@options).to_string.should =~ /command/
#     end
#     describe "in resource" do
#       before(:each) do
#         @tc.instance_eval do
#           has_deploydirectory do
#             name "deploydirectory"
#             from ::File.dirname(__FILE__)
#             to "/var/www/deploydirectory"
#           end
#         end
#       end
#       it "should have the path set within the resource" do
#         @tc.resource(:deploydirectory).first.to_string.should =~ /exec \{/
#       end
#       it "should not have the from in the to_string" do
#         @tc.resource(:deploydirectory).first.to_string.should_not =~ /from /
#       end
#       it "should not have the to in the to_string" do
#         @tc.resource(:deploydirectory).first.to_string.should_not =~ /to /
#       end
#       it "should have onlyif in the to_string" do
#         @tc.resource(:deploydirectory).first.to_string.should =~ /onlyif/
#       end
#     end
#   end
# end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
auser-poolparty-1.1.1 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.1.3 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.1.4 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.1.5 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.1.6 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.1.7 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.0 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.1 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.2 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.3 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.4 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.7 spec/poolparty/plugins/deploydirectory_spec.rb
auser-poolparty-1.2.8 spec/poolparty/plugins/deploydirectory_spec.rb
fairchild-poolparty-1.1.3 spec/poolparty/plugins/deploydirectory_spec.rb
fairchild-poolparty-1.1.4 spec/poolparty/plugins/deploydirectory_spec.rb
fairchild-poolparty-1.1.5 spec/poolparty/plugins/deploydirectory_spec.rb
poolparty-1.2.2 spec/poolparty/plugins/deploydirectory_spec.rb