Sha256: e67864eeea3ae92a8ee9536f7732a421180258e6b1c36e506d3cc15834b3ea0e

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 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 jar" do
      dir_path = File.join("spec", "data", "commons-logging")
      jar_path = File.join(dir_path, "commons-logging-1.1.1.jar")
      path, status = pom_getter.get_pom(jar_path)
      status.should eq :found_in_jar
      File.exist?(path).should be_true
      FileUtils.rm(path)
    end

    it "gets the pom from sha1" do
      dir_path = File.join("spec", "data", "antlr")
      jar_path = File.join(dir_path, "antlr-2.7.2.jar")
      path, status = pom_getter.get_pom(jar_path)
      status.should eq :found_via_sha1
      File.exist?(path).should be_true
      FileUtils.rm(path)
    end
    
    it "gets the pom from a heuristic" do
      dir_path = File.join("spec", "data", "nailgun")
      jar_path = File.join(dir_path, "nailgun-0.7.1.jar")
      path, status = pom_getter.get_pom(jar_path)
      status.should eq :found_via_heuristic
      File.exist?(path).should be_true
      FileUtils.rm(path)
    end         
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gjp-0.36.0 spec/lib/pom_getter_spec.rb
gjp-0.35.0 spec/lib/pom_getter_spec.rb
gjp-0.34.0 spec/lib/pom_getter_spec.rb
gjp-0.33.0 spec/lib/pom_getter_spec.rb
gjp-0.32.0 spec/lib/pom_getter_spec.rb
gjp-0.31.0 spec/lib/pom_getter_spec.rb
gjp-0.30.0 spec/lib/pom_getter_spec.rb