- context "Without Puppet::Util.absolute_path? (e.g. Puppet <= 2.6)" do
- before :each do
- # The intent here is to mock Puppet to behave like Puppet 2.6 does.
- # Puppet 2.6 does not have the absolute_path? method. This is only a
- # convenience test, stdlib should be run with the Puppet 2.6.x in the
- # $LOAD_PATH in addition to 2.7.x and master.
- Puppet::Util.expects(:respond_to?).with(:absolute_path?).returns(false)
- end
- valid_paths.each do |path|
- it "validate_absolute_path(#{path.inspect}) should not fail" do
- expect { subject.call [path] }.not_to raise_error
- end
- end
- valid_paths do
- it "validate_absolute_path(#{valid_paths.inspect}) should not fail" do
- expect { subject.call [valid_paths] }.not_to raise_error
- end
- end
- end
+ describe 'signature validation' do
+ it { is_expected.not_to eq(nil) }
+ it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
+ end