[DRE-commits] [librarian-puppet] 115/153: add additional tests for receiver

Stig Sandbeck Mathisen ssm at debian.org
Wed Jun 1 20:30:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository librarian-puppet.

commit 374ed974340edfd7415556f5dcf6fe8550045590
Author: Corey Osman <corey at logicminds.biz>
Date:   Mon May 18 15:12:18 2015 -0700

    add additional tests for receiver
---
 spec/receiver_spec.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/spec/receiver_spec.rb b/spec/receiver_spec.rb
index 6f9b0ab..401b36a 100644
--- a/spec/receiver_spec.rb
+++ b/spec/receiver_spec.rb
@@ -5,7 +5,7 @@ describe 'Librarian::Puppet::Dsl::Receiver' do
   let(:dsl) { Librarian::Puppet::Dsl.new({}) }
   let(:target) { Librarian::Dsl::Target.new(dsl) }
   let(:receiver) { Librarian::Puppet::Dsl::Receiver.new(target) }
-
+  let(:environment) { Librarian::Puppet::Environment.new(:project_path => '/tmp/tmp_module') }
   describe '#run' do
 
     it 'should get working_dir from pwd when specfile is nil' do
@@ -22,5 +22,10 @@ describe 'Librarian::Puppet::Dsl::Receiver' do
       receiver.run(Pathname.new('/tmp/tmp_module/Puppetfile')) {}
       expect(receiver.working_path).to eq(Pathname.new('/tmp/tmp_module'))
     end
+
+    it 'test receiver run' do
+      error_message = 'Metadata file does not exist: '+File.join(environment.project_path, 'metadata.json')
+      expect{environment.dsl(environment.specfile.path, [])}.to raise_error(Librarian::Error,error_message)
+    end
   end
 end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git



More information about the Pkg-ruby-extras-commits mailing list