Sha256: 14abe132ab1473805643c0397bda6f0f0bda7a0b650e8ba22bb354f1713e6c76

Contents?: true

Size: 1.19 KB

Versions: 19

Compression:

Stored size: 1.19 KB

Contents

# encoding: UTF-8

require 'spec_helper'

describe Gjp::PomGetter do
  let(:pom_getter) { Gjp::PomGetter.new }

  describe "#get_pom" do
    it "gets the pom from a directory" do
      dir_path = File.join("spec", "data", "commons-logging")
      pom_path = File.join(dir_path, "pom.xml")
      pom_getter.get_pom(dir_path).should eq(File.read(pom_path))
    end
    
    it "gets the pom from a jar" do
      dir_path = File.join("spec", "data", "commons-logging")
      pom_path = File.join(dir_path, "pom.xml")
      jar_path = File.join(dir_path, "commons-logging-1.1.1.jar")
      pom_getter.get_pom(jar_path).should eq(File.read(pom_path))
    end

    it "gets the pom from sha1" do
      dir_path = File.join("spec", "data", "antlr")
      pom_path = File.join(dir_path, "pom.xml")
      jar_path = File.join(dir_path, "antlr-2.7.2.jar")
      pom_getter.get_pom(jar_path).should eq(File.read(pom_path))
    end
    
    it "gets the pom from a heuristic" do
      dir_path = File.join("spec", "data", "nailgun")
      pom_path = File.join(dir_path, "pom.xml")
      jar_path = File.join(dir_path, "nailgun-0.7.1.jar")
      pom_getter.get_pom(jar_path).should eq(File.read(pom_path))
    end         
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gjp-0.28.0 spec/lib/pom_getter_spec.rb
gjp-0.27.0 spec/lib/pom_getter_spec.rb
gjp-0.26.0 spec/lib/pom_getter_spec.rb
gjp-0.25.0 spec/lib/pom_getter_spec.rb
gjp-0.24.0 spec/lib/pom_getter_spec.rb
gjp-0.23.0 spec/lib/pom_getter_spec.rb
gjp-0.22.0 spec/lib/pom_getter_spec.rb
gjp-0.21.0 spec/lib/pom_getter_spec.rb
gjp-0.20.0 spec/lib/pom_getter_spec.rb
gjp-0.19.0 spec/lib/pom_getter_spec.rb
gjp-0.18.0 spec/lib/pom_getter_spec.rb
gjp-0.17.1 spec/lib/pom_getter_spec.rb
gjp-0.17.0 spec/lib/pom_getter_spec.rb
gjp-0.16.1 spec/lib/pom_getter_spec.rb
gjp-0.16.0 spec/lib/pom_getter_spec.rb
gjp-0.15.7 spec/lib/pom_getter_spec.rb
gjp-0.14.1 spec/lib/pom_getter_spec.rb
gjp-0.13.1 spec/lib/pom_getter_spec.rb
gjp-0.11.2 spec/lib/pom_getter_spec.rb