diff options
author | Prabhu Das <prabhu.das@clogeny.com> | 2013-08-07 16:07:36 +0530 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-09-23 16:02:49 -0700 |
commit | 0a5e63b44a6a8f33d901bfcb744b20aeb130a794 (patch) | |
tree | 948911d3f079199decdfbe2a302dad26f6d82409 | |
parent | 85b1453c22a44f704f6d9d03e54425480f1b0e75 (diff) | |
download | ohai-0a5e63b44a6a8f33d901bfcb744b20aeb130a794.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 |