Remove is_valid_netmask instead of unstubbing. Doesn't seem like a sensible function on its own.

This commit is contained in:
Ken Barber 2011-07-28 21:10:33 +01:00
parent 313df566bf
commit 1a7bd1ae83
2 changed files with 0 additions and 39 deletions

View file

@ -1,18 +0,0 @@
#
# is_valid_netmask.rb
#
module Puppet::Parser::Functions
newfunction(:is_valid_netmask, :type => :rvalue, :doc => <<-EOS
EOS
) do |arguments|
if (arguments.size != 1) then
raise(Puppet::ParseError, "is_valid_netmask(): Wrong number of arguments "+
"given #{arguments.size} for 1")
end
end
end
# vim: set ts=2 sw=2 et :

View file

@ -1,21 +0,0 @@
#!/usr/bin/env rspec
require 'spec_helper'
describe "the is_valid_netmask 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("is_valid_netmask").should == "function_is_valid_netmask"
end
it "should raise a ParseError if there is less than 1 arguments" do
lambda { @scope.function_is_valid_netmask([]) }.should( raise_error(Puppet::ParseError))
end
end