Skip to content

Commit 63beed7

Browse files
committed
Update default recipe's spec to add regression test for Solaris2 (#21)
1 parent cfb3036 commit 63beed7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

spec/recipes/default_spec.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,20 @@
137137
end
138138

139139
context 'on Solaris2' do
140-
it_should_behave_like 'an unsupported OS', 'solaris2', '5.11'
140+
let(:chef_run) do
141+
allow(::File).to receive(:symlink?).with('/etc/localtime')
142+
.and_return(false)
143+
stub_command('svccfg -s timezone:default listprop timezone/localtime | grep UTC')
144+
.and_return('stubbed value')
145+
ChefSpec::SoloRunner.new(platform: 'solaris2', version: '5.11')
146+
.converge(described_recipe)
147+
end
148+
149+
specify { expect(chef_run).to install_package('timezone') }
150+
specify { expect(chef_run).to include_recipe('timezone-ii::solaris2') }
151+
specify do
152+
expect(chef_run).not_to include_recipe('timezone-ii::linux-generic')
153+
end
141154
end
142155

143156
context 'on SUSE' do

0 commit comments

Comments
 (0)