spec/ohai/plugins/solaris2/kernel_spec.rb in ohai-0.5.8 vs spec/ohai/plugins/solaris2/kernel_spec.rb in ohai-0.6.0.beta.0

- old
+ new

@@ -130,22 +130,22 @@ 143 12fea22 14864 33 1 st (SCSI tape Driver 1.238) 144 1379790 2a12 53 1 semsys (System V semaphore facility) 145 12138e4 15e4 4 1 RT (realtime scheduling class) 146 121719e 28c - 1 RT_DPTBL (realtime dispatch table) TOOMUCH - + before(:each) do @ohai = Ohai::System.new @ohai.stub!(:require_plugin).and_return(true) @ohai[:kernel] = Mash.new @ohai.stub(:from).with("uname -s").and_return("SunOS") end - + it_should_check_from_deep_mash("solaris2::kernel", "kernel", "os", "uname -s", "SunOS") it "gives excruciating detail about kernel modules" do - stdin = mock("stdin", :null_object => true) + stdin = StringIO.new @modinfo_stdout = StringIO.new(MODINFO) @ohai.stub!(:popen4).with("modinfo").and_yield(nil, stdin, @modinfo_stdout, nil) @ohai._require_plugin("solaris2::kernel") @@ -157,8 +157,8 @@ teh_daterz = { "id" => 6, "loadaddr" => "1180000", "size" => 17955, "description" => "filesystem for specfs"} @ohai[:kernel][:modules].keys.should include("specfs") @ohai[:kernel][:modules].keys.should_not include("Module") @ohai[:kernel][:modules]["specfs"].should == teh_daterz end - - -end \ No newline at end of file + + +end