diff options
author | Prabhu Das <prabhu.das@clogeny.com> | 2013-08-07 16:07:36 +0530 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-08-19 11:52:45 -0700 |
commit | 8891085e286755b95fd99a5825e15a1cc850a8de (patch) | |
tree | 7ec5f495df2d5f814f4d89bc97a152ea99fe07b3 | |
parent | 117e00278221a0c2f1c105f8f15113be15bc0559 (diff) | |
download | ohai-8891085e286755b95fd99a5825e15a1cc850a8de.tar.gz |
Refactored Aix uptime unit tests.
-rw-r--r-- | spec/unit/plugins/aix/uptime_spec.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/spec/unit/plugins/aix/uptime_spec.rb b/spec/unit/plugins/aix/uptime_spec.rb index f7868130..3c8cc6d9 100644 --- a/spec/unit/plugins/aix/uptime_spec.rb +++ b/spec/unit/plugins/aix/uptime_spec.rb @@ -19,16 +19,11 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb') describe Ohai::System, "Aix plugin uptime" do - uptime_info=<<-WHO - . system boot Jul 9 17:51 - WHO - before(:each) do @ohai = Ohai::System.new @plugin = Ohai::DSL::Plugin.new(@ohai, File.expand_path("aix/uptime.rb", PLUGIN_PATH)) @plugin[:os] = "aix" - @uptime_info = uptime_info.split("\n") - @plugin.stub(:popen4).with("who -b").and_yield(nil, StringIO.new, @uptime_info, nil) + @plugin.stub(:popen4).with("who -b").and_yield(nil, StringIO.new, StringIO.new(" . system boot Jul 9 17:51"), nil) Time.stub_chain(:now, :to_i).and_return(1375857797) end |