spec/unit/processor_spec.rb in facter-1.6.2 vs spec/unit/processor_spec.rb in facter-1.6.3
- old
+ new
@@ -205,11 +205,11 @@
it "should be 2 via sysfs when cpu0 and cpu1 are present" do
Facter.fact(:kernel).stubs(:value).returns("Linux")
File.stubs(:exists?).with('/sys/devices/system/cpu').returns(true)
## sysfs method is only used if cpuinfo method returned no processors
File.stubs(:exists?).with("/proc/cpuinfo").returns(true)
- File.stubs(:readlines).with("/proc/cpuinfo").returns("")
+ File.stubs(:readlines).with("/proc/cpuinfo").returns([])
Dir.stubs(:glob).with("/sys/devices/system/cpu/cpu[0-9]*").returns(%w{
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu1
})
@@ -219,10 +219,10 @@
it "should be 16 via sysfs when cpu0 through cpu15 are present" do
Facter.fact(:kernel).stubs(:value).returns("Linux")
File.stubs(:exists?).with('/sys/devices/system/cpu').returns(true)
## sysfs method is only used if cpuinfo method returned no processors
File.stubs(:exists?).with("/proc/cpuinfo").returns(true)
- File.stubs(:readlines).with("/proc/cpuinfo").returns("")
+ File.stubs(:readlines).with("/proc/cpuinfo").returns([])
Dir.stubs(:glob).with("/sys/devices/system/cpu/cpu[0-9]*").returns(%w{
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu1
/sys/devices/system/cpu/cpu2
/sys/devices/system/cpu/cpu3