[Pkg-puppet-devel] [facter] 212/352: (fact-273) Expect a warning message that can be expected

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 9c221b7f321e6ee57354cfd2867a8c26413e3f0d
Author: Kylo Ginsberg <kylo at puppetlabs.com>
Date:   Wed Feb 5 13:35:04 2014 -0800

    (fact-273) Expect a warning message that can be expected
    
    Add a warning message expectation to suppress the warning message
    on stdout/stderr during spec runs.  Also, remove a stub that
    duplicated a stub in the before block.
---
 spec/unit/util/macaddress_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spec/unit/util/macaddress_spec.rb b/spec/unit/util/macaddress_spec.rb
index 7435dfb..df513b6 100755
--- a/spec/unit/util/macaddress_spec.rb
+++ b/spec/unit/util/macaddress_spec.rb
@@ -67,11 +67,11 @@ describe "Darwin", :unless => Facter::Util::Config.is_windows? do
 
             it "should warn about the lack of default" do
               Facter.expects(:warn).with("Could not find a default route. Using first non-loopback interface")
-              Facter::Util::Macaddress::Darwin.stubs(:default_interface).returns('')
               Facter::Util::Macaddress::Darwin.macaddress
             end
 
             it "should return the macaddress of the first non-loopback interface" do
+              Facter.expects(:warn).with("Could not find a default route. Using first non-loopback interface")
               Facter::Util::Macaddress::Darwin.macaddress.should == fallback_macaddress
             end
           end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list