-
-
Save domcleal/5890455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/spec/unit/macaddress_spec.rb b/spec/unit/macaddress_spec.rb | |
| index 638ef2a..d219dfe 100755 | |
| --- a/spec/unit/macaddress_spec.rb | |
| +++ b/spec/unit/macaddress_spec.rb | |
| @@ -49,6 +49,14 @@ describe "macaddress fact" do | |
| proc { Facter.value(:macaddress) }.should_not raise_error | |
| Facter.value(:macaddress).should be_nil | |
| end | |
| + | |
| + # when ifconfig isn't installed, nil is returned which should be handled gracefully without any | |
| + # errors raised | |
| + it "should not raise any errors when nil is returned" do | |
| + Facter::Util::IP.expects(:exec_ifconfig).at_least_once.with(["-a","2>/dev/null"]). | |
| + returns(nil) | |
| + expect { Facter.value(:macaddress) }.not_to have_printed('Could not retrieve macaddress') | |
| + end | |
| end | |
| describe "when run on BSD" do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment