Skip to content

Commit 48a3c98

Browse files
committed
fix broken unit tests
1 parent e3b28da commit 48a3c98

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

spec/defines/requirements_spec.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
context 'with /requirements.txt' do
1616
let :params do
1717
{
18-
requirements: '/requirements.txt'
18+
requirements: '/requirements.txt',
19+
cwd: '/foo'
1920
}
2021
end
2122

23+
it { is_expected.to compile.with_all_deps }
2224
it { is_expected.to contain_file('/requirements.txt').with_mode('0644') }
2325

2426
context 'with manage_requirements => false' do
@@ -33,7 +35,8 @@
3335
let :params do
3436
{
3537
owner: 'bob',
36-
group: 'bob'
38+
group: 'bob',
39+
'cwd': '/foo'
3740
}
3841
end
3942

@@ -42,8 +45,16 @@
4245
end
4346

4447
context 'default' do
48+
let :params do
49+
{
50+
'cwd': '/foo'
51+
}
52+
end
4553
it { is_expected.to contain_file('/requirements.txt').with_owner('root').with_group('root') }
4654
end
55+
describe 'without cwd' do
56+
it { is_expected.to compile.and_raise_error(%r{parameter 'cwd' expects a Stdlib::Absolutepath}) }
57+
end
4758
end
4859
end
4960
end

0 commit comments

Comments
 (0)