correcting final code sample
Removing this gives me an error
spec/spec_helper.rb:8:in `block in <top (required)>': undefined method `module_path=' for #<RSpec::Core::Configuration:0x007fd28a857320> (NoMethodError)
but keeping it doesn't make it work either.
I have no success with this example. I can only get the error
Puppet::Error Could not find data item foo_message in any Hiera data file and no default supplied
I have the example code here, if you would have a look https://github.com/larstobi/rspec-hiera-puppet-example