From f3e79ddcd56a221c7799b35efde7e9803a5c7923 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Mon, 1 Jun 2015 12:21:59 +0100 Subject: Convert tests to use plain rspec-puppet Tests in the new style produces the following documentation output: abs should not eq nil should run abs() and raise an Puppet::ParseError should run abs(-34) and return 34 should run abs("-34") and return 34 should run abs(34) and return 34 should run abs("34") and return 34 --- spec/functions/assert_private_spec.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'spec/functions/assert_private_spec.rb') diff --git a/spec/functions/assert_private_spec.rb b/spec/functions/assert_private_spec.rb index a009d28..98f2598 100755 --- a/spec/functions/assert_private_spec.rb +++ b/spec/functions/assert_private_spec.rb @@ -1,15 +1,7 @@ -#! /usr/bin/env ruby -S rspec require 'spec_helper' -describe Puppet::Parser::Functions.function(:assert_private) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - subject do - function_name = Puppet::Parser::Functions.function(:assert_private) - scope.method(function_name) - end - - context "when called from inside module" do +describe 'assert_private' do + context 'when called from inside module' do it "should not fail" do scope.expects(:lookupvar).with('module_name').returns('foo') scope.expects(:lookupvar).with('caller_module_name').returns('foo') -- cgit v1.2.3