spec/repository_spec.rb in depengine-3.0.20 vs spec/repository_spec.rb in depengine-3.0.21

- old
+ new

@@ -11,43 +11,43 @@ require_relative '../lib/depengine/log/log' $log = Log::DeploymentLogger.new $log.writer.level = Log4r::DEBUG -describe "getting a file" do - context "with maven" do - it "should get from a remote repository" do +describe 'getting a file' do + context 'with maven' do + it 'should get from a remote repository' do tmp_dir = Dir.mktmpdir begin - test = Provider::Repository.new() - test.repository = "http://repo1.maven.org/maven2/" - test.user = "" - test.password = "" - test.method = "maven" + test = Provider::Repository.new + test.repository = 'http://repo1.maven.org/maven2/' + test.user = '' + test.password = '' + test.method = 'maven' - test.get_from_repository("org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.jar", tmp_dir) - File.file?(tmp_dir+'/maven-model-2.2.1.jar').should be true + test.get_from_repository('org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.jar', tmp_dir) + File.file?(tmp_dir + '/maven-model-2.2.1.jar').should be true ensure FileUtils.remove_entry tmp_dir end end end - context "with SCP" do - it "should get a file from a remote host" do + context 'with SCP' do + it 'should get a file from a remote host' do tmp_dir = Dir.mktmpdir begin - FileUtils.mkdir tmp_dir+"/source" - FileUtils.touch tmp_dir+"/source/test.file" + FileUtils.mkdir tmp_dir + '/source' + FileUtils.touch tmp_dir + '/source/test.file' - test = Provider::Repository.new() - test.host = "localhost" + test = Provider::Repository.new + test.host = 'localhost' test.user = ENV['USER'] - test.sshkey = ENV['HOME']+"/.ssh/id_rsa" - test.method = "scp" + test.sshkey = ENV['HOME'] + '/.ssh/id_rsa' + test.method = 'scp' - test.get_from_repository(tmp_dir+"/source/test.file", tmp_dir) - File.file?(tmp_dir+'/test.file').should be true + test.get_from_repository(tmp_dir + '/source/test.file', tmp_dir) + File.file?(tmp_dir + '/test.file').should be true ensure FileUtils.remove_entry tmp_dir end end end