Files
puppet-ceph/spec/classes/ceph_conf_spec.rb
Sebastien Badia cf6478490e 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 new
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:

  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * 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)

Change-Id: I512ffe4ac12763ec5a4bea935001088bad231cc1
2015-02-27 13:41:44 +00:00

50 lines
1.2 KiB
Ruby

#
# Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Author: Loic Dachary <loic@dachary.org>
#
require 'spec_helper'
describe 'ceph::conf' do
let :params do
{
:args => {
'A' => {
'value' => 'AA VALUE',
},
'B' => { }
},
:defaults => {
'value' => 'DEFAULT',
},
}
end
it {
is_expected.to contain_ceph_config('A').with('value' => "AA VALUE")
is_expected.to contain_ceph_config('B').with('value' => "DEFAULT")
}
end
# Local Variables:
# compile-command: "cd ../.. ;
# export BUNDLE_PATH=/tmp/vendor ;
# bundle install ;
# bundle exec rake spec
# "
# End: