diff options
author | David Schmitt <david.schmitt@puppetlabs.com> | 2015-06-01 12:21:59 +0100 |
---|---|---|
committer | David Schmitt <david.schmitt@puppetlabs.com> | 2015-06-01 18:02:22 +0100 |
commit | f3e79ddcd56a221c7799b35efde7e9803a5c7923 (patch) | |
tree | 730386688574c94169d47d37f79af77c2cda2f08 /spec/functions/assert_private_spec.rb | |
parent | b62dff0c6e09faf9bacfb02575e689ed09ee5e56 (diff) |
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
Diffstat (limited to 'spec/functions/assert_private_spec.rb')
-rwxr-xr-x | spec/functions/assert_private_spec.rb | 12 |
1 files changed, 2 insertions, 10 deletions
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') |