Sha256: 400e872a8375f25c50e104101c8f7bd4330b2887d0f9452e34a1929d69e69adf

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

# Polisher Gemfile Specs
#
# Licensed under the MIT license
# Copyright (C) 2013-2014 Red Hat, Inc.

require 'spec_helper'

require 'polisher/gemfile'

module Bundler
  describe "#gem" do
    it "stores parsed gems"
  end
end

module Polisher
  describe Gemfile do
    describe "#initialize" do
      it "sets gemfile deps,dev_deps" do
        gemfile = Polisher::Gemfile.new :deps => ['rails'], :dev_deps => ['rake']
        gemfile.deps.should == ['rails']
        gemfile.dev_deps.should == ['rake']
      end

      it "sets default gemfile version,files" do
        gemfile = Polisher::Gemfile.new
        gemfile.version.should be_nil
        gemfile.file_paths.should == []
      end
    end

    describe "#parse" do
      it "returns new gemfile instance" do
        gemfile = Polisher::Test::GEMFILE
        pgemfile = Polisher::Gemfile.parse gemfile[:path]
        pgemfile.should be_an_instance_of(Polisher::Gemfile)
      end

      it "parses deps,dev_deps from spec" do
        gemfile = Polisher::Test::GEMFILE
        pgemfile = Polisher::Gemfile.parse gemfile[:path]
        pgemfile.deps.should == gemfile[:deps]
        #pgemfile.dev_deps.should...
      end
    end

    describe "#vendored" do
      it "returns gemfile deps + dev_deps" do
        gemfile = described_class.new :deps => ['rails'], :dev_deps => ['rake']
        gemfile.vendored.should == ['rails', 'rake']
      end
    end

    describe "#patched" do
      it "..."
    end
  end # describe Gemfile
end # module Polisher

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
polisher-0.10.2 spec/gemfile_spec.rb
polisher-0.10.1 spec/gemfile_spec.rb
polisher-0.9.1 spec/gemfile_spec.rb
polisher-0.8.1 spec/gemfile_spec.rb