Sha256: 191b1c948453e7626326ad71ef2361580f18fe65a3b232c23a87d2a7879132c4

Contents?: true

Size: 1.36 KB

Versions: 33

Compression:

Stored size: 1.36 KB

Contents

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

include PoolParty::Resources

describe "Gem" do
  before(:each) do
    reset!
    @cloud = cloud :gem_cloud do
      has_gempackage(:name => "activesupport") do
        has_gempackage(:name => "rails")
      end
    end
    @gem = @cloud.get_resource(:gempackage, "activesupport")
  end
  it "should have a package" do
    @cloud.resource(:gempackage).should_not be_empty
  end
  it "should have the name set as activesupport" do
    @gem.name.should == "activesupport"
  end
  it "should have the 'rails' gem in the packages" do
    @cloud.get_resource(:gempackage, "activesupport").to_string.should =~ /activesupport/
  end
  describe "with parent options" do
    before(:each) do
      reset_resources!
    end
    describe "reset" do
      before(:each) do      
        @cloud1 = cloud :gem_version_cloud do
          has_gempackage(:name => "ParseTree", :version => "2.2.0") do
            has_gempackage(:name => "edge-rails")
          end
        end
        @gem = @cloud1.resource(:gempackage).first
        @gem2 = @gem.resource(:gempackage).first
      end
      it "should have the version set on the parent" do
        @gem.version.should == "2.2.0"
      end
      it "should not take the version of the parent on the child" do
        @gem.resource(:gempackage).first.version.should == nil
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
auser-poolparty-0.2.20 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.21 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.22 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.23 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.24 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.25 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.26 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.35 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.36 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.37 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.38 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.39 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.40 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.41 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.42 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.44 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.45 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.46 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.47 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.48 spec/poolparty/pool/resources/gem_spec.rb