sys-proctable 1.0.0-universal-mingw32 → 1.1.0-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_sys_top.rb CHANGED
@@ -1,46 +1,65 @@
1
- ##############################################################################
2
- # test_sys_top.rb
3
- #
4
- # Test suite for the sys-top library that is included with this distribution.
5
- ##############################################################################
6
- require 'rubygems'
7
- gem 'test-unit'
8
-
9
- require 'test/unit'
10
- require 'sys/top'
11
-
12
- class TC_Top < Test::Unit::TestCase
13
- include Sys
14
-
15
- def test_version
16
- assert_equal('1.0.4', Top::VERSION)
17
- end
18
-
19
- def test_top_basic
20
- assert_respond_to(Top, :top)
21
- assert_nothing_raised{ Top.top }
22
- assert_nothing_raised{ Top.top(5) }
23
- assert_nothing_raised{ Top.top(5, 'cmdline') }
24
- end
25
-
26
- def test_top
27
- assert_equal(10, Top.top.length)
28
- assert_kind_of(Struct::ProcTableStruct, Top.top.first)
29
- end
30
-
31
- def test_top_with_size
32
- assert_equal(5, Top.top(5).length)
33
- end
34
-
35
- def test_top_with_size_and_sort_by_field
36
- assert_equal(5, Top.top(5, :cmdline).length)
37
- end
38
-
39
- def test_top_return_type
40
- assert_kind_of(Array, Top.top)
41
- end
42
-
43
- def test_top_expected_errors
44
- assert_raises(ArgumentError){ Top.top(1, 'foo', 2) }
45
- end
46
- end
1
+ ##############################################################################
2
+ # test_sys_top.rb
3
+ #
4
+ # Test suite for the sys-top library that is included with this distribution.
5
+ #
6
+ # Tests omitted on OSX until I figure out how to get pctcpu information.
7
+ ##############################################################################
8
+ require 'test-unit'
9
+ require 'sys/top'
10
+
11
+ class TC_Top < Test::Unit::TestCase
12
+ include Sys
13
+
14
+ def setup
15
+ @osx = RbConfig::CONFIG['host_os'] =~ /darwin/i
16
+ end
17
+
18
+ test "top version" do
19
+ assert_equal('1.0.4', Top::VERSION)
20
+ end
21
+
22
+ test "top basic functionality" do
23
+ assert_respond_to(Top, :top)
24
+ end
25
+
26
+ test "top works with no arguments" do
27
+ omit_if(@osx)
28
+ assert_nothing_raised{ Top.top }
29
+ end
30
+
31
+ test "top accepts optional arguments" do
32
+ omit_if(@osx)
33
+ assert_nothing_raised{ Top.top(5) }
34
+ assert_nothing_raised{ Top.top(5, 'cmdline') }
35
+ end
36
+
37
+ test "top with no arguments returns expected results" do
38
+ omit_if(@osx)
39
+ assert_equal(10, Top.top.length)
40
+ assert_kind_of(Struct::ProcTableStruct, Top.top.first)
41
+ end
42
+
43
+ test "top with size argument returns expected result" do
44
+ omit_if(@osx)
45
+ assert_equal(5, Top.top(5).length)
46
+ end
47
+
48
+ test "top with size and sort_by argument returns expected result" do
49
+ omit_if(@osx)
50
+ assert_equal(5, Top.top(5, :cmdline).length)
51
+ end
52
+
53
+ test "top returns an array" do
54
+ omit_if(@osx)
55
+ assert_kind_of(Array, Top.top)
56
+ end
57
+
58
+ test "top accepts a maximum of two arguments" do
59
+ assert_raises(ArgumentError){ Top.top(1, 'foo', 2) }
60
+ end
61
+
62
+ def teardown
63
+ @osx = nil
64
+ end
65
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-proctable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -30,7 +30,7 @@ cert_chain:
30
30
  EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
31
  tGSHgAmcLlkdGgan182qsE/4kKM=
32
32
  -----END CERTIFICATE-----
33
- date: 2016-01-11 00:00:00.000000000 Z
33
+ date: 2016-06-27 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: test-unit
@@ -90,7 +90,7 @@ files:
90
90
  - lib/windows/sys/proctable.rb
91
91
  homepage: http://github.com/djberg96/sys-proctable
92
92
  licenses:
93
- - Artistic 2.0
93
+ - Apache 2.0
94
94
  metadata: {}
95
95
  post_install_message:
96
96
  rdoc_options: []
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.5.1
112
+ rubygems_version: 2.6.4
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: An interface for providing process table information
metadata.gz.sig CHANGED
Binary file