X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fstdlib%2Fspec%2Funit%2Fpuppet%2Fparser%2Ffunctions%2Fstr2bool_spec.rb;fp=modules%2Fstdlib%2Fspec%2Funit%2Fpuppet%2Fparser%2Ffunctions%2Fstr2bool_spec.rb;h=0000000000000000000000000000000000000000;hb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;hp=d7f0ac9db3c494238171e8a85e4070503161c44c;hpb=23d29143ac40015ce61cf83a4067466f8f7d66dc;p=mirror%2Fdsa-puppet.git diff --git a/modules/stdlib/spec/unit/puppet/parser/functions/str2bool_spec.rb b/modules/stdlib/spec/unit/puppet/parser/functions/str2bool_spec.rb deleted file mode 100644 index d7f0ac9db..000000000 --- a/modules/stdlib/spec/unit/puppet/parser/functions/str2bool_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' - -describe "the str2bool 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("str2bool").should == "function_str2bool" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { @scope.function_str2bool([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert string 'true' to true" do - result = @scope.function_str2bool(["true"]) - result.should(eq(true)) - end - - it "should convert string 'undef' to false" do - result = @scope.function_str2bool(["undef"]) - result.should(eq(false)) - end - -end