Skip to content
Browse files

Updated solaris detection, fixed broken tests

  • Loading branch information...
1 parent ba189a3 commit 6fb1f3c87d63968ccd55ab03fdf241b6a001d853 @itsderek23 itsderek23 committed Mar 2, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 memory_profiler/memory_profiler.rb
  2. +3 −2 memory_profiler/test.rb
View
2 memory_profiler/memory_profiler.rb
@@ -102,7 +102,7 @@ def solaris?
else
solaris = false
begin
- solaris = true if `uname` =~ /sun/i
+ solaris = true if `uname` =~ /sunos/i
rescue
end
end
View
5 memory_profiler/test.rb
@@ -14,7 +14,7 @@ def test_success_linux
assert res[:errors].empty?
assert !res[:memory][:solaris]
- assert_equal 6, res[:reports].first.keys.size
+ assert_equal 7, res[:reports].first.keys.size
r = res[:reports].first
assert_equal 0, r["Swap Used"]
@@ -23,6 +23,7 @@ def test_success_linux
assert_equal 0, r["% Swap Used"]
assert_equal 264, r["Memory Used"]
assert_equal 1024, r["Memory Total"]
+ assert_equal 760, r["Memory Available"]
end
def test_success_linux_second_run
@@ -44,7 +45,7 @@ def test_success_with_no_buffers
assert res[:errors].empty?
assert !res[:memory][:solaris]
- assert_equal 5, res[:reports].first.keys.size
+ assert_equal 6, res[:reports].first.keys.size
end
def test_success_solaris

0 comments on commit 6fb1f3c

Please sign in to comment.
Something went wrong with that request. Please try again.