diff options
author | Ken Barber <ken@bob.sh> | 2011-07-29 17:55:45 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-29 17:55:45 +0100 |
commit | 4080c0534e76cf68b935344c75b2382f0184a226 (patch) | |
tree | ddf74ba1f46b5f8f28f56d3a10c0342e48ecebb4 /spec | |
parent | ce48eb6e7a76f74e1f61c76ac3b185031c40772b (diff) | |
download | puppet-stdlib-4080c0534e76cf68b935344c75b2382f0184a226.tar.gz puppet-stdlib-4080c0534e76cf68b935344c75b2382f0184a226.tar.bz2 |
(#2) unstub is_valid_mac_address.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/parser/functions/is_valid_mac_address_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/unit/parser/functions/is_valid_mac_address_spec.rb b/spec/unit/parser/functions/is_valid_mac_address_spec.rb index c4eb468..62e6fee 100644 --- a/spec/unit/parser/functions/is_valid_mac_address_spec.rb +++ b/spec/unit/parser/functions/is_valid_mac_address_spec.rb @@ -19,12 +19,17 @@ describe "the is_valid_mac_address function" do end it "should return true if a valid mac address" do - result = @scope.function_is_valid_mac_address("00:a0:1f:12:7f:a0") + result = @scope.function_is_valid_mac_address(["00:a0:1f:12:7f:a0"]) result.should(eq(true)) end + it "should return false if octets are out of range" do + result = @scope.function_is_valid_mac_address(["00:a0:1f:12:7f:g0"]) + result.should(eq(false)) + end + it "should return false if not valid" do - result = @scope.function_is_valid_mac_address("not valid") + result = @scope.function_is_valid_mac_address(["not valid"]) result.should(eq(false)) end |