Sha256: a718bb35d13e04fa1d881499dd41757997210757b31d42b60a069f1d03c30a44

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 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

2 entries across 2 versions & 1 rubygems

Version Path
gjp-0.39.0 spec/lib/pom_getter_spec.rb
gjp-0.38.0 spec/lib/pom_getter_spec.rb