spec/unit/action/deploy/module_spec.rb in r10k-3.4.0 vs spec/unit/action/deploy/module_spec.rb in r10k-3.4.1
- old
+ new
@@ -23,10 +23,14 @@
end
it 'can accept a puppet-path option' do
described_class.new({ 'puppet-path': '/nonexistent' }, [])
end
+
+ it 'can accept a cachedir option' do
+ described_class.new({ cachedir: '/nonexistent' }, [])
+ end
end
describe "with no-force" do
subject { described_class.new({ config: "/some/nonexistent/path", :'no-force' => true}, [] )}
@@ -119,8 +123,17 @@
subject { described_class.new({ config: '/some/nonexistent/path', 'puppet-path': '/nonexistent' }, []) }
it 'sets puppet_path' do
expect(subject.instance_variable_get(:@puppet_path)).to eq('/nonexistent')
+ end
+ end
+
+ describe 'with cachedir' do
+
+ subject { described_class.new({ config: '/some/nonexistent/path', cachedir: '/nonexistent' }, []) }
+
+ it 'sets puppet_path' do
+ expect(subject.instance_variable_get(:@cachedir)).to eq('/nonexistent')
end
end
end