public
Rubygem
Description: Ruby process monitor
Homepage: http://god.rubyforge.org
Clone URL: git://github.com/mojombo/god.git
Search Repo:
Click here to lend your support to: god and make a donation at www.pledgie.com !
fix tests for portable poller
mojombo (author)
Tue May 13 22:08:49 -0700 2008
commit  b3b55b5794e816d1b20e7a6908551f2430d7403f
tree    6c4c1ba8e10ab28d48193f6c2ad9cace8970a2d1
parent  4f12e1ceb12a9da7444a4de3572b3288f623276b
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -1 +1,17 @@
0
+require File.dirname(__FILE__) + '/helper'
0
+
0
+class TestSystemPortablePoller < Test::Unit::TestCase
0
+ def setup
0
+ pid = Process.pid
0
+ @process = System::PortablePoller.new(pid)
0
+ end
0
+
0
+ def test_time_string_to_seconds
0
+ assert_equal 0, @process.bypass.time_string_to_seconds('0:00:00')
0
+ assert_equal 0, @process.bypass.time_string_to_seconds('0:00:55')
0
+ assert_equal 27, @process.bypass.time_string_to_seconds('0:27:32')
0
+ assert_equal 75, @process.bypass.time_string_to_seconds('1:15:13')
0
+ assert_equal 735, @process.bypass.time_string_to_seconds('12:15:13')
0
+ end
0
+end
...
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
...
26
27
28
 
 
 
 
 
 
 
 
 
 
 
 
29
0
@@ -26,17 +26,5 @@
0
   def test_percent_cpu
0
     assert_kind_of Float, @process.percent_cpu
0
   end
0
-
0
- def test_cpu_time
0
- assert_kind_of Integer, @process.cpu_time
0
- end
0
-
0
- def test_time_string_to_seconds
0
- assert_equal 0, @process.bypass.time_string_to_seconds('0:00:00')
0
- assert_equal 0, @process.bypass.time_string_to_seconds('0:00:55')
0
- assert_equal 27, @process.bypass.time_string_to_seconds('0:27:32')
0
- assert_equal 75, @process.bypass.time_string_to_seconds('1:15:13')
0
- assert_equal 735, @process.bypass.time_string_to_seconds('12:15:13')
0
- end
0
 end

Comments

    No one has commented yet.