Skip to content

Commit

Permalink
Add unit tests to prove #22
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet committed May 19, 2016
1 parent 1309cc3 commit ab51279
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions spec/rspec_puppet_facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,44 @@
end
end

context 'When testing Ubuntu' do
subject {
on_supported_os(
{
:supported_os => [
{
"operatingsystem" => "Ubuntu",
"operatingsystemrelease" => [
"14.04",
"14.10",
"15.04",
"15.10",
"16.04",
],
},
],
}
)
}
it 'should return a hash' do
expect(subject.class).to eq Hash
end
it 'should have 5 elements' do
pending "There's obviously a bug here!"
expect(subject.size).to eq 5
end
it 'should return supported OS' do
pending "There's obviously a bug here!"
expect(subject.keys.sort).to eq [
'ubuntu-14.04-amd64',
'ubuntu-14.10-amd64',
'ubuntu-15.04-amd64',
'ubuntu-15.10-amd64',
'ubuntu-16.04-amd64',
]
end
end

context 'When testing FreeBSD 10' do
subject {
on_supported_os(
Expand Down

0 comments on commit ab51279

Please sign in to comment.