Sha256: 87738d00b87cdb14c96a3547bfb5d1488b69ee7ddd6e0b1961ac81889e61842d

Contents?: true

Size: 1.1 KB

Versions: 26

Compression:

Stored size: 1.1 KB

Contents

# encoding: UTF-8

require "spec_helper"

describe Tetra::PomGetter do
  let(:pom_getter) { Tetra::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)
      expect(status).to eq :found_in_jar
      expect(File.exist?(path)).to be_truthy
      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)
      expect(status).to eq :found_via_sha1
      expect(File.exist?(path)).to be_truthy
      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)
      expect(status).to eq :found_via_heuristic
      expect(File.exist?(path)).to be_truthy
      FileUtils.rm(path)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
tetra-2.0.6 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.5 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.4 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.3 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.2 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.1 spec/lib/fine/pom_getter_spec.rb
tetra-2.0.0 spec/lib/fine/pom_getter_spec.rb
tetra-1.2.2 spec/lib/pom_getter_spec.rb
tetra-1.2.1 spec/lib/pom_getter_spec.rb
tetra-1.2.0 spec/lib/pom_getter_spec.rb
tetra-1.1.0 spec/lib/pom_getter_spec.rb
tetra-1.0.0 spec/lib/pom_getter_spec.rb
tetra-0.54.0 spec/lib/pom_getter_spec.rb
tetra-0.53.0 spec/lib/pom_getter_spec.rb
tetra-0.52.0 spec/lib/pom_getter_spec.rb
tetra-0.51.0 spec/lib/pom_getter_spec.rb
tetra-0.50.0 spec/lib/pom_getter_spec.rb
tetra-0.49.0 spec/lib/pom_getter_spec.rb
tetra-0.48.0 spec/lib/pom_getter_spec.rb
tetra-0.46.0 spec/lib/pom_getter_spec.rb