Sha256: b4c4ad1ff59a45357a84e41b59ac00dd3d162f58871d85b33957441d5d78b6dc
Contents?: true
Size: 703 Bytes
Versions: 22
Compression:
Stored size: 703 Bytes
Contents
#! /usr/bin/env ruby require 'spec_helper' require 'facter/util/xendomains' describe Facter::Util::Xendomains do describe ".get_domains" do it "should return a list of running Xen Domains on Xen0" do xen0_domains = my_fixture_read("xendomains") Facter::Core::Execution.stubs(:exec).with('/usr/sbin/xm list 2>/dev/null').returns(xen0_domains) Facter::Util::Xendomains.get_domains.should == %{web01,mailserver} end describe "when xm list isn't executable" do it "should be nil" do Facter::Core::Execution.stubs(:exec).with('/usr/sbin/xm list 2>/dev/null').returns(nil) Facter::Util::Xendomains.get_domains.should == nil end end end end
Version data entries
22 entries across 22 versions & 1 rubygems