Created
May 6, 2009 06:31
-
-
Save pnasrat/107393 to your computer and use it in GitHub Desktop.
Trying to add operatingsystem tests
This file contains 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
#!/usr/bin/env ruby | |
require File.dirname(__FILE__) + '/../spec_helper' | |
require 'facter' | |
describe "Operating System fact" do | |
before do | |
Facter.loadfacts | |
end | |
it "should identify Oracle VM as OVS" do | |
Facter.fact(:kernel).stubs(:value).returns("Linux") | |
FileTest.expects(:exists).with("/etc/ovs-release").returns true | |
FileTest.expects(:exists).with("/etc/enterprise-release").returns true | |
Facter.fact(:operatingsystem).value.should == "OVS" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment