In order to test with rspec-puppet we need to set up the fixtures, and test via rake spec, so we change that too
@@ -0,0 +1,3 @@
+fixtures:
+ symlinks:
+ inifile: '#{source_dir}'
@@ -0,0 +1,2 @@
+spec/fixtures/modules/inifile
+Gemfile.lock
@@ -0,0 +1,10 @@
+require 'spec_helper'
+# We can't really test much here, apart from the type roundtrips though the
+# parser OK.
+describe 'inherit_test1' do
+ it do
+ should contain_inherit_ini_setting('valid_type').with({
+ 'value' => 'true'
+ })
+ end
+end
@@ -0,0 +1,11 @@
+Puppet::Type.type(:inherit_ini_setting).provide(
+ :ini_setting,
+ :parent => Puppet::Type.type(:ini_setting).provider(:ruby)
+) do
+ def section
+ '' # all global
+ def self.file_path
+ '/tmp/demo_inherit_inifile.cfg'
@@ -0,0 +1,5 @@
+Puppet::Type.newtype(:inherit_ini_setting) do
+ ensurable
+ newparam(:setting, :namevar => true)
+ newproperty(:value)
+class inherit_test1 {
+ inherit_ini_setting { 'valid_type':
+ value => true,
+ }
+}
@@ -6,6 +6,8 @@ require 'puppetlabs_spec_helper/puppetlabs_spec_helper'
require 'puppetlabs_spec_helper/puppetlabs_spec/files'
+require 'puppetlabs_spec_helper/module_spec_helper'
+
RSpec.configure do |config|
config.mock_with :rspec
end