Sha256: d30f431c7bc5b9cde42533d8a4db10e718fff6ca66cde9270abdb0570f9789f1

Contents?: true

Size: 1.14 KB

Versions: 13

Compression:

Stored size: 1.14 KB

Contents

#--
# (c) Copyright 2007-2008 Sun Microsystems, Inc.
# See the file LICENSES.txt included with the distribution for
# software license details.
#++

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

describe Warbler::Gems do
  it "should accept a hash for initialization" do
    gems = Warbler::Gems.new({"actionpack" => "1.2.3"})
    gems.should have_key("actionpack")
    gems["actionpack"].should == "1.2.3"
  end

  it "should accept an array for initialization" do
    gems = Warbler::Gems.new ["activerecord"]
    gems.should have_key("activerecord")
  end

  it "should allow gems with a version" do
    gems = Warbler::Gems.new
    gems["actionpack"] = "> 1.2.3"
    gems["actionpack"].should == "> 1.2.3"
  end

  it "should allow gems without an explicit version" do
    gems = Warbler::Gems.new
    gems << "actionpack"
    gems.should have_key("actionpack")
  end

  it "should allow to add gems" do
    gems = Warbler::Gems.new
    gems << "rails"
    gems += ["activerecord-jdbcmysql-adapter", "jdbc-mysql", "jruby-openssl"]
    ["rails", "activerecord-jdbcmysql-adapter", "jdbc-mysql", "jruby-openssl"].each {|g| gems.should have_key(g)}
  end
end

Version data entries

13 entries across 13 versions & 7 rubygems

Version Path
aslakhellesoy-warbler-0.9.12 spec/warbler/gems_spec.rb
aslakhellesoy-warbler-0.9.13.4 spec/warbler/gems_spec.rb
aslakhellesoy-warbler-0.9.13 spec/warbler/gems_spec.rb
bekkopen-warbler-0.9.13.1 spec/warbler/gems_spec.rb
finnlabs-warbler-0.9.14 spec/warbler/gems_spec.rb
fjc-warbler-0.9.12 spec/warbler/gems_spec.rb
manalang-warbler-0.9.12.1 spec/warbler/gems_spec.rb
nicksieger-warbler-0.9.12 spec/warbler/gems_spec.rb
nicksieger-warbler-0.9.13 spec/warbler/gems_spec.rb
nicksieger-warbler-0.9.14 spec/warbler/gems_spec.rb
warbler-0.9.14 spec/warbler/gems_spec.rb
warbler-0.9.12 spec/warbler/gems_spec.rb
warbler-0.9.13 spec/warbler/gems_spec.rb