Sha256: 9e6a4efb78b0f3ed71ebaee914c851292b9ce529b2d7645392ceb709d7f773b9

Contents?: true

Size: 952 Bytes

Versions: 8

Compression:

Stored size: 952 Bytes

Contents

require 'spec_helper'

describe Bundler::Dsl do
  describe '#_normalize_options' do
    before do
      @rubygems = mock("rubygems")
      Bundler::Source::Rubygems.stub(:new){ @rubygems }
    end

    it "should convert :github to :git" do
      subject.gem("sparks", :github => "indirect/sparks")
      github_uri = "git://github.com/indirect/sparks.git"
      subject.dependencies.first.source.uri.should == github_uri
    end

    it "should convert 'rails' to 'rails/rails'" do
      subject.gem("rails", :github => "rails")
      github_uri = "git://github.com/rails/rails.git"
      subject.dependencies.first.source.uri.should == github_uri
    end
  end

  describe "syntax errors" do
    it "should raise a Bundler::GemfileError" do
      gemfile "gem 'foo', :path => /unquoted/string/syntax/error"
      lambda { Bundler::Dsl.evaluate(bundled_app("Gemfile"), nil, true) }.
        should raise_error(Bundler::GemfileError)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bundler-1.1.4 spec/bundler/dsl_spec.rb
bundler-1.1.3 spec/bundler/dsl_spec.rb
bundler-1.1.2 spec/bundler/dsl_spec.rb
bundler-1.1.1 spec/bundler/dsl_spec.rb
bundler-1.1.0 spec/bundler/dsl_spec.rb
bundler-1.1.rc.8 spec/bundler/dsl_spec.rb
bundler-1.1.rc.7 spec/bundler/dsl_spec.rb
bundler-1.1.rc.6 spec/bundler/dsl_spec.rb