Sha256: b89c7db73c381db2474ec8ef3afc7104f561cf13ef40bb9a2d1da4cc11993509

Contents?: true

Size: 1.31 KB

Versions: 30

Compression:

Stored size: 1.31 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
    @gem.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

30 entries across 30 versions & 2 rubygems

Version Path
auser-poolparty-0.2.62 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.63 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.64 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.65 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.66 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.67 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.68 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.69 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.70 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.71 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.72 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.74 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.76 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.77 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.78 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.79 spec/poolparty/pool/resources/gem_spec.rb
auser-poolparty-0.2.80 spec/poolparty/poolparty/resources/gem_spec.rb
auser-poolparty-0.2.81 spec/poolparty/poolparty/resources/gem_spec.rb
auser-poolparty-0.2.84 spec/poolparty/poolparty/resources/gem_spec.rb
auser-poolparty-0.2.85 spec/poolparty/poolparty/resources/gem_spec.rb