Files
puppet-keystone/spec/classes/keystone_client_spec.rb
Sebastien Badia fa7d680c0d 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 in
order to be prepared for rspec 3.x move.

In details:

  * Use shared_examples "a Puppet::Error" for puppet::error tests
  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Fix spec tests for rspec-puppet 2.0.0
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
  * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)
  * Standardize gemfile (add json, webmock)

Change-Id: I35a39d4f3919d56c9448f0a0602cfe284ebc2e9c
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-15 18:09:53 +01:00

23 lines
490 B
Ruby

require 'spec_helper'
describe 'keystone::client' do
describe "with default parameters" do
it { is_expected.to contain_package('python-keystoneclient').with(
'ensure' => 'present',
'tag' => 'openstack'
) }
end
describe "with specified version" do
let :params do
{:ensure => '2013.1'}
end
it { is_expected.to contain_package('python-keystoneclient').with(
'ensure' => '2013.1',
'tag' => 'openstack'
) }
end
end