puppet-tuskar/spec/classes/tuskar_client_spec.rb
Sebastien Badia 7c18a413d3 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
order to be prepared for rspec 3.x move.

In details:

  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0

Change-Id: Ic9ac859be612f2afc5486340e5aa8eaf83473ab4
2015-02-25 05:09:33 +01:00

39 lines
772 B
Ruby

#
# Unit tests for tuskar::client
#
require 'spec_helper'
describe 'tuskar::client' do
shared_examples_for 'tuskar client' do
context 'with default parameters' do
it { is_expected.to contain_package('python-tuskarclient').with_ensure('present') }
end
context 'with package_ensure parameter provided' do
let :params do
{ :package_ensure => false }
end
it { is_expected.to contain_package('python-tuskarclient').with_ensure('false') }
end
end
context 'on Debian platforms' do
let :facts do
{ :osfamily => 'Debian' }
end
it_configures 'tuskar client'
end
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat' }
end
it_configures 'tuskar client'
end
end