1896040791
- Convert 'should' keyword to 'is_expected.to' - The old ':should' syntax in rspec 3.x is deprecated in favor of ':expect' syntax. - Operator matchers: '1.should == 1' into 'expect(1).to eq(1)' Change-Id: I84b993065a00f5b5c55bd6834c6d54bc57c249e0 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
30 lines
843 B
Ruby
30 lines
843 B
Ruby
#
|
|
# these tests are a little concerning b/c they are hacking around the
|
|
# modulepath, so these tests will not catch issues that may eventually arise
|
|
# related to loading these plugins.
|
|
# I could not, for the life of me, figure out how to programatcally set the modulepath
|
|
$LOAD_PATH.push(
|
|
File.join(
|
|
File.dirname(__FILE__),
|
|
'..',
|
|
'..',
|
|
'..',
|
|
'fixtures',
|
|
'modules',
|
|
'inifile',
|
|
'lib')
|
|
)
|
|
require 'spec_helper'
|
|
provider_class = Puppet::Type.type(:keystone_paste_ini).provider(:ini_setting)
|
|
describe provider_class do
|
|
|
|
it 'should allow setting to be set explicitly' do
|
|
resource = Puppet::Type::Keystone_paste_ini.new(
|
|
{:name => 'dude/foo', :value => 'bar'}
|
|
)
|
|
provider = provider_class.new(resource)
|
|
expect(provider.section).to eq('dude')
|
|
expect(provider.setting).to eq('foo')
|
|
end
|
|
end
|