Sha256: 1a126322e4ebe39df8e1fd65a9af6c1c36318aaf983996aea6de7e6836da28d5
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
# encoding: UTF-8 require "spec_helper" require "fileutils" describe Tetra::SourceGetter do include Tetra::Mockers let(:source_getter) { Tetra::SourceGetter.new } before(:each) do create_mock_project end after(:each) do delete_mock_project end describe "#get_maven_source_jars" do it "gets sources for jars in the Maven repo through Maven itself" do create_mock_executable("mvn") @project.from_directory(File.join("kit", "m2")) do jar_dir_path = File.join("net", "test", "artifact", "1.0") jar_path = File.join(jar_dir_path, "artifact-1.0-blabla.jar") FileUtils.mkdir_p(jar_dir_path) FileUtils.touch(jar_path) successes, failures = source_getter.get_maven_source_jars(@project) commandline = File.read(File.join("..", "..", "test_out")).strip expect(commandline).to match(/-Dartifact=net.test:artifact:1.0:jar:sources -Dtransitive=false$/) expect(successes).to include File.join(".", "kit", "m2", jar_path) expect(failures).to eq [] end end end end
Version data entries
7 entries across 7 versions & 1 rubygems