[DRE-commits] [librarian-puppet] 113/153: Issue #302 Add Dsl::Receiver test
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 da341d5fa2b5490b6775a2168d32ae25224b62ca
Author: Carlos Sanchez <carlos at apache.org>
Date: Tue May 19 09:54:04 2015 +0200
Issue #302 Add Dsl::Receiver test
---
spec/receiver_spec.rb | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/spec/receiver_spec.rb b/spec/receiver_spec.rb
new file mode 100644
index 0000000..6f9b0ab
--- /dev/null
+++ b/spec/receiver_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+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) }
+
+ describe '#run' do
+
+ it 'should get working_dir from pwd when specfile is nil' do
+ receiver.run(nil) {}
+ expect(receiver.working_path).to eq(Pathname.new(Dir.pwd))
+ end
+
+ it 'should get working_dir from pwd with default specfile' do
+ receiver.run(dsl.default_specfile) {}
+ expect(receiver.working_path).to eq(Pathname.new(Dir.pwd))
+ end
+
+ it 'should get working_dir from given path' do
+ receiver.run(Pathname.new('/tmp/tmp_module/Puppetfile')) {}
+ expect(receiver.working_path).to eq(Pathname.new('/tmp/tmp_module'))
+ 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