X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fstdlib%2Fspec%2Funit%2Fpuppet%2Fparser%2Ffunctions%2Fempty_spec.rb;fp=modules%2Fstdlib%2Fspec%2Funit%2Fpuppet%2Fparser%2Ffunctions%2Fempty_spec.rb;h=0000000000000000000000000000000000000000;hb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;hp=cb0021f74f057ac6eeba84c7893e9e6b9c387d0e;hpb=23d29143ac40015ce61cf83a4067466f8f7d66dc;p=mirror%2Fdsa-puppet.git diff --git a/modules/stdlib/spec/unit/puppet/parser/functions/empty_spec.rb b/modules/stdlib/spec/unit/puppet/parser/functions/empty_spec.rb deleted file mode 100755 index cb0021f74..000000000 --- a/modules/stdlib/spec/unit/puppet/parser/functions/empty_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' - -describe "the empty function" do - before :all do - Puppet::Parser::Functions.autoloader.loadall - end - - before :each do - @scope = Puppet::Parser::Scope.new - end - - it "should exist" do - Puppet::Parser::Functions.function("empty").should == "function_empty" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { @scope.function_empty([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return a true for an empty string" do - result = @scope.function_empty(['']) - result.should(eq(true)) - end - - it "should return a false for a non-empty string" do - result = @scope.function_empty(['asdf']) - result.should(eq(false)) - end - -end