sys-proctable 1.2.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/{CHANGES.rdoc → CHANGES.md} +69 -49
  4. data/Gemfile +2 -0
  5. data/{MANIFEST.rdoc → MANIFEST.md} +9 -1
  6. data/README.md +9 -3
  7. data/Rakefile +10 -7
  8. data/certs/djberg96_pub.pem +26 -0
  9. data/lib/bsd/sys/dragonfly/sys/proctable/constants.rb +11 -0
  10. data/lib/bsd/sys/dragonfly/sys/proctable/functions.rb +14 -0
  11. data/lib/bsd/sys/dragonfly/sys/proctable/structs.rb +298 -0
  12. data/lib/bsd/sys/dragonfly/sys/proctable.rb +175 -0
  13. data/lib/bsd/sys/freebsd/sys/proctable/constants.rb +0 -0
  14. data/lib/bsd/sys/freebsd/sys/proctable/functions.rb +0 -0
  15. data/lib/bsd/sys/freebsd/sys/proctable/structs.rb +0 -0
  16. data/lib/{freebsd → bsd/sys/freebsd}/sys/proctable.rb +1 -1
  17. data/lib/bsd/sys/proctable.rb +8 -0
  18. data/lib/darwin/sys/proctable.rb +53 -20
  19. data/lib/linux/sys/proctable/cgroup_entry.rb +4 -2
  20. data/lib/linux/sys/proctable/smaps.rb +29 -17
  21. data/lib/linux/sys/proctable.rb +41 -35
  22. data/lib/sunos/sys/proctable.rb +2 -2
  23. data/lib/sys/proctable/version.rb +1 -1
  24. data/lib/sys/proctable.rb +2 -2
  25. data/lib/sys/top.rb +7 -2
  26. data/lib/windows/sys/proctable.rb +36 -32
  27. data/spec/spec_helper.rb +15 -0
  28. data/spec/sys_proctable_aix_spec.rb +74 -76
  29. data/spec/sys_proctable_all_spec.rb +45 -45
  30. data/spec/sys_proctable_bsd_spec.rb +244 -0
  31. data/spec/sys_proctable_darwin_spec.rb +85 -58
  32. data/spec/sys_proctable_linux_spec.rb +196 -195
  33. data/spec/sys_proctable_sunos_spec.rb +190 -192
  34. data/spec/sys_proctable_windows_spec.rb +153 -153
  35. data/spec/sys_top_spec.rb +20 -21
  36. data/sys-proctable.gemspec +16 -24
  37. data.tar.gz.sig +0 -0
  38. metadata +78 -18
  39. metadata.gz.sig +0 -0
  40. data/spec/sys_proctable_freebsd_spec.rb +0 -210
@@ -2,13 +2,11 @@
2
2
  # sys_proctable_aix_spec.rb
3
3
  #
4
4
  # Test suite for the AIX version of the sys-proctable library. You
5
- # should run these tests via the 'rake test' task.
5
+ # should run these tests via the 'rake spec' task.
6
6
  #######################################################################
7
- require 'rspec'
8
- require 'sys/proctable'
9
- require_relative 'sys_proctable_all_spec'
7
+ require 'spec_helper'
10
8
 
11
- describe Sys::ProcTable do
9
+ RSpec.describe Sys::ProcTable, :aix do
12
10
  let(:fields){
13
11
  %w[
14
12
  addr argc argv bindpro cid clname cmd_args cmdline cwd egid environ
@@ -30,8 +28,8 @@ describe Sys::ProcTable do
30
28
  end
31
29
 
32
30
  @myenv = ENV.to_hash
33
- @p1args = %w/aix-child.rb testing how well this works 1/
34
- @p2args = %w/aix-child.rb testing how well this works 2/
31
+ @p1args = %w[aix-child.rb testing how well this works 1]
32
+ @p2args = %w[aix-child.rb testing how well this works 2]
35
33
 
36
34
  @pid1 = fork do
37
35
  exec('ruby', *@p1args)
@@ -61,212 +59,212 @@ describe Sys::ProcTable do
61
59
  File.unlink('aix-child.rb') rescue nil
62
60
  end
63
61
 
64
- context "fields singleton method" do
65
- it "responds to a fields method" do
62
+ context 'fields singleton method' do
63
+ it 'responds to a fields method' do
66
64
  expect(described_class).to respond_to(:fields)
67
65
  end
68
66
 
69
- it "returns the expected results for the fields method" do
67
+ it 'returns the expected results for the fields method' do
70
68
  expect(described_class.fields).to be_kind_of(Array)
71
69
  expect(described_class.fields).to eql(fields)
72
70
  end
73
71
  end
74
72
 
75
- context "ProcTable::Struct members" do
76
- it "contains a flag member and returns the expected value" do
73
+ context 'ProcTable::Struct members' do
74
+ it 'contains a flag member and returns the expected value' do
77
75
  expect(@p1info).to respond_to(:flag)
78
- expect(@p1info.flag).to be_kind_of(Fixnum)
76
+ expect(@p1info.flag).to be_kind_of(Integer)
79
77
  end
80
78
 
81
- it "contains a flag2 member and returns the expected value" do
79
+ it 'contains a flag2 member and returns the expected value' do
82
80
  expect(@p1info).to respond_to(:flag2)
83
- expect(@p1info.flag2).to be_kind_of(Fixnum)
81
+ expect(@p1info.flag2).to be_kind_of(Integer)
84
82
  end
85
83
 
86
- it "contains a nlwp member and returns the expected value" do
84
+ it 'contains a nlwp member and returns the expected value' do
87
85
  expect(@p1info).to respond_to(:nlwp)
88
- expect(@p1info.nlwp).to be_kind_of(Fixnum)
86
+ expect(@p1info.nlwp).to be_kind_of(Integer)
89
87
  end
90
88
 
91
- it "contains a uid member and returns the expected value" do
89
+ it 'contains a uid member and returns the expected value' do
92
90
  expect(@p1info).to respond_to(:uid)
93
91
  expect(@p1info.uid).to be_kind_of(Integer)
94
- expect(@p1info.uid).to eql(@p1info.uid)
92
+ expect(@p1info.uid).to eql(Process.uid)
95
93
  end
96
94
 
97
- it "contains a euid member and returns the expected value" do
95
+ it 'contains a euid member and returns the expected value' do
98
96
  expect(@p1info).to respond_to(:euid)
99
97
  expect(@p1info.euid).to be_kind_of(Integer)
100
- expect(@p1info.euid).to eql(@p1info.euid)
98
+ expect(@p1info.euid).to eql(Process.euid)
101
99
  end
102
100
 
103
- it "contains a gid member and returns the expected value" do
101
+ it 'contains a gid member and returns the expected value' do
104
102
  expect(@p1info).to respond_to(:gid)
105
103
  expect(@p1info.gid).to be_kind_of(Integer)
106
- expect(@p1info.gid).to eql(@p1info.gid)
104
+ expect(@p1info.gid).to eql(Process.gid)
107
105
  end
108
106
 
109
- it "contains a egid member and returns the expected value" do
107
+ it 'contains a egid member and returns the expected value' do
110
108
  expect(@p1info).to respond_to(:egid)
111
109
  expect(@p1info.egid).to be_kind_of(Integer)
112
- expect(@p1info.egid).to eql(@p1info.egid)
110
+ expect(@p1info.egid).to eql(Process.egid)
113
111
  end
114
112
 
115
- it "contains a pid member and returns the expected value" do
113
+ it 'contains a pid member and returns the expected value' do
116
114
  expect(@p1info).to respond_to(:pid)
117
115
  expect(@p1info.pid).to be_kind_of(Integer)
118
- expect(@p1info.pid).to eql(@p1info.pid)
116
+ expect(@p1info.pid).to eql(@pid1)
119
117
  end
120
118
 
121
- it "contains a ppid member and returns the expected value" do
119
+ it 'contains a ppid member and returns the expected value' do
122
120
  expect(@p1info).to respond_to(:ppid)
123
121
  expect(@p1info.ppid).to be_kind_of(Integer)
124
- expect(@p1info.ppid).to eql(@p1info.ppid)
122
+ expect(@p1info.ppid).to eql(Process.pid)
125
123
  end
126
124
 
127
- it "contains a pgid member and returns the expected value" do
125
+ it 'contains a pgid member and returns the expected value' do
128
126
  expect(@p1info).to respond_to(:pgid)
129
127
  expect(@p1info.pgid).to be_kind_of(Integer)
130
- expect(@p1info.pgid).to eql(@p1info.pgid)
128
+ expect(@p1info.pgid).to eql(Process.getpgrp)
131
129
  end
132
130
 
133
- it "contains a sid member and returns the expected value" do
131
+ it 'contains a sid member and returns the expected value' do
134
132
  expect(@p1info).to respond_to(:sid)
135
133
  expect(@p1info.sid).to be_kind_of(Integer)
136
134
  end
137
135
 
138
- it "contains a ttydev member and returns the expected value" do
136
+ it 'contains a ttydev member and returns the expected value' do
139
137
  expect(@p1info).to respond_to(:ttydev)
140
138
  expect(@p1info.ttydev).to be_kind_of(Integer)
141
139
  end
142
140
 
143
- it "contains a addr member and returns the expected value" do
141
+ it 'contains a addr member and returns the expected value' do
144
142
  expect(@p1info).to respond_to(:addr)
145
143
  expect(@p1info.addr).to be_kind_of(Integer)
146
144
  end
147
145
 
148
- it "contains a size member and returns the expected value" do
146
+ it 'contains a size member and returns the expected value' do
149
147
  expect(@p1info).to respond_to(:size)
150
148
  expect(@p1info.size).to be_kind_of(Integer)
151
149
  end
152
150
 
153
- it "contains a rssize member and returns the expected value" do
151
+ it 'contains a rssize member and returns the expected value' do
154
152
  expect(@p1info).to respond_to(:rssize)
155
153
  expect(@p1info.rssize).to be_kind_of(Integer)
156
154
  end
157
155
 
158
- it "contains a start member and returns the expected value" do
156
+ it 'contains a start member and returns the expected value' do
159
157
  expect(@p1info).to respond_to(:start)
160
158
  expect(@p1info.start).to be_kind_of(Time)
161
159
  end
162
160
 
163
- it "contains a time member and returns the expected value" do
161
+ it 'contains a time member and returns the expected value' do
164
162
  expect(@p1info).to respond_to(:time)
165
163
  expect(@p1info.time).to be_kind_of(Time)
166
164
  end
167
165
 
168
- it "contains a cid member and returns the expected value" do
166
+ it 'contains a cid member and returns the expected value' do
169
167
  expect(@p1info).to respond_to(:cid)
170
- expect(@p1info.cid).to be_kind_of(Fixnum)
168
+ expect(@p1info.cid).to be_kind_of(Integer)
171
169
  end
172
170
 
173
- it "contains an argc member and returns the expected value" do
171
+ it 'contains an argc member and returns the expected value' do
174
172
  expect(@p1info).to respond_to(:argc)
175
- expect(@p1info.argc).to be_kind_of(Fixnum)
173
+ expect(@p1info.argc).to be_kind_of(Integer)
176
174
  expect(@p1info.argc).to eql(@p1args.size + 1)
177
175
  end
178
176
 
179
- it "contains an argv member and returns the expected value" do
177
+ it 'contains an argv member and returns the expected value' do
180
178
  expect(@p1info).to respond_to(:argv)
181
179
  expect(@p1info.argv).to be_kind_of(Integer)
182
180
  end
183
181
 
184
- it "contains an envp member and returns the expected value" do
182
+ it 'contains an envp member and returns the expected value' do
185
183
  expect(@p1info).to respond_to(:envp)
186
184
  expect(@p1info.envp).to be_kind_of(Integer)
187
185
  end
188
186
 
189
- it "contains an fname member and returns the expected value" do
187
+ it 'contains an fname member and returns the expected value' do
190
188
  expect(@p1info).to respond_to(:fname)
191
189
  expect(@p1info.fname).to be_kind_of(String)
192
190
  end
193
191
 
194
- it "contains an fname member and returns the expected value" do
192
+ it 'contains an psargs member and returns the expected value' do
195
193
  expect(@p1info).to respond_to(:psargs)
196
194
  expect(@p1info.psargs).to be_kind_of(String)
197
195
  end
198
196
 
199
- it "contains an lwpid member and returns the expected value" do
197
+ it 'contains an lwpid member and returns the expected value' do
200
198
  expect(@p1info).to respond_to(:lwpid)
201
199
  expect(@p1info.lwpid).to be_kind_of(Integer)
202
200
  end
203
201
 
204
- it "contains a wchan member and returns the expected value" do
202
+ it 'contains a wchan member and returns the expected value' do
205
203
  expect(@p1info).to respond_to(:wchan)
206
204
  expect(@p1info.wchan).to be_kind_of(Integer)
207
205
  end
208
206
 
209
- it "contains a wtype member and returns the expected value" do
207
+ it 'contains a wtype member and returns the expected value' do
210
208
  expect(@p1info).to respond_to(:wtype)
211
- expect(@p1info.wchan).to be_kind_of(Fixnum)
209
+ expect(@p1info.wchan).to be_kind_of(Integer)
212
210
  end
213
211
 
214
- it "contains a state member and returns the expected value" do
212
+ it 'contains a state member and returns the expected value' do
215
213
  expect(@p1info).to respond_to(:state)
216
- expect(@p1info.state).to be_kind_of(Fixnum)
214
+ expect(@p1info.state).to be_kind_of(Integer)
217
215
  end
218
216
 
219
- it "contains an sname member and returns the expected value" do
217
+ it 'contains an sname member and returns the expected value' do
220
218
  expect(@p1info).to respond_to(:sname)
221
219
  expect(@p1info.sname).to be_kind_of(String)
222
220
  end
223
221
 
224
- it "contains a nice member and returns the expected value" do
222
+ it 'contains a nice member and returns the expected value' do
225
223
  expect(@p1info).to respond_to(:nice)
226
- expect(@p1info.nice).to be_kind_of(Fixnum)
224
+ expect(@p1info.nice).to be_kind_of(Integer)
227
225
  end
228
226
 
229
- it "contains a pri member and returns the expected value" do
227
+ it 'contains a pri member and returns the expected value' do
230
228
  expect(@p1info).to respond_to(:pri)
231
- expect(@p1info.pri).to be_kind_of(Fixnum)
229
+ expect(@p1info.pri).to be_kind_of(Integer)
232
230
  end
233
231
 
234
- it "contains a policy member and returns the expected value" do
232
+ it 'contains a policy member and returns the expected value' do
235
233
  expect(@p1info).to respond_to(:policy)
236
- expect(@p1info.policy).to be_kind_of(Fixnum)
234
+ expect(@p1info.policy).to be_kind_of(Integer)
237
235
  end
238
236
 
239
- it "contains a clname member and returns the expected value" do
237
+ it 'contains a clname member and returns the expected value' do
240
238
  expect(@p1info).to respond_to(:clname)
241
239
  expect(@p1info.clname).to be_kind_of(String)
242
240
  end
243
241
 
244
- it "contains an onpro member and returns the expected value" do
242
+ it 'contains an onpro member and returns the expected value' do
245
243
  expect(@p1info).to respond_to(:onpro)
246
- expect(@p1info.onpro).to be_kind_of(Fixnum)
244
+ expect(@p1info.onpro).to be_kind_of(Integer)
247
245
  end
248
246
 
249
- it "contains a bindpro member and returns the expected value" do
247
+ it 'contains a bindpro member and returns the expected value' do
250
248
  expect(@p1info).to respond_to(:bindpro)
251
- expect(@p1info.bindpro).to be_kind_of(Fixnum)
249
+ expect(@p1info.bindpro).to be_kind_of(Integer)
252
250
  end
253
251
 
254
- it "contains a ptid member and returns the expected value" do
252
+ it 'contains a ptid member and returns the expected value' do
255
253
  expect(@p1info).to respond_to(:ptid)
256
- expect(@p1info.ptid).to be_kind_of(Fixnum)
254
+ expect(@p1info.ptid).to be_kind_of(Integer)
257
255
  end
258
256
 
259
- it "contains a comm member and returns the expected value" do
257
+ it 'contains a comm member and returns the expected value' do
260
258
  expect(@p1info).to respond_to(:comm)
261
259
  expect(@p1info.comm).to be_kind_of(String)
262
260
  end
263
261
 
264
- it "contains a fd member and returns the expected value" do
262
+ it 'contains a fd member and returns the expected value' do
265
263
  expect(@p1info).to respond_to(:fd)
266
264
  expect(@p1info.fd).to be_kind_of(Array)
267
265
  end
268
266
 
269
- it "contains a cmd_args member and returns the expected value" do
267
+ it 'contains a cmd_args member and returns the expected value' do
270
268
  expect(@p1info).to respond_to(:cmd_args)
271
269
  expect(@p1info.cmd_args).to be_kind_of(Array)
272
270
  expect(@p1info.cmd_args).to_eql(['ruby', @p1args].flatten)
@@ -276,7 +274,7 @@ describe Sys::ProcTable do
276
274
  expect(@p2info.cmd_args).to_eql(['ruby', @p2args].flatten)
277
275
  end
278
276
 
279
- it "contains an environ member and returns the expected value" do
277
+ it 'contains an environ member and returns the expected value' do
280
278
  expect(@p1info).to respond_to(:environ)
281
279
  expect(@p1info.environ).to be_kind_of(Hash)
282
280
  expect(@p1info.environ).to eql(@myenv)
@@ -286,29 +284,29 @@ describe Sys::ProcTable do
286
284
  expect(@p2info.environ).to eql(@myenv)
287
285
  end
288
286
 
289
- it "contains a cmdline member and returns the expected value" do
287
+ it 'contains a cmdline member and returns the expected value' do
290
288
  expect(@p1info).to respond_to(:cmdline)
291
289
  expect(@p1info.cmdline).to be_kind_of(String)
292
290
  end
293
291
 
294
- it "contains a cwd member and returns the expected value" do
292
+ it 'contains a cwd member and returns the expected value' do
295
293
  expect(@p1info).to respond_to(:cwd)
296
294
  expect(@p1info.cwd).to be_kind_of(String) if @p1info.cwd
297
295
  end
298
296
 
299
- it "contains a map member and returns the expected value" do
297
+ it 'contains a map member and returns the expected value' do
300
298
  expect(@p1info).to respond_to(:map)
301
299
  expect(@p1info.map).to be_kind_of(Array) if @p1info.map
302
300
  end
303
301
  end
304
302
 
305
- context "Struct::ProcTableMapStruct" do
306
- it "contains the expected members" do
303
+ context 'Struct::ProcTableMapStruct' do
304
+ it 'contains the expected members' do
307
305
  expect(@p1info.map).to be_kind_of(Array)
308
306
  expect(map_fields.sort).to eql(@p1info.map[0].members.sort)
309
307
  end
310
308
 
311
- it "has members of the expected type" do
309
+ it 'has members of the expected type' do
312
310
  expect(@p1info.map).to be_kind_of(Array)
313
311
  p1info_map = @p1info.map
314
312
 
@@ -2,89 +2,89 @@
2
2
  # sys_proctable_all_spec.rb
3
3
  #
4
4
  # Test suite for methods common to all platforms. Generally speaking
5
- # you should run these specs using the 'rake test' task.
5
+ # you should run these specs using the 'rake spec' task.
6
6
  #######################################################################
7
- require 'rspec'
8
- require 'sys/proctable'
9
- require_relative 'sys_top_spec'
7
+ require 'spec_helper'
10
8
 
11
- describe Sys::ProcTable do
9
+ RSpec.describe 'common' do
12
10
  let(:windows) { File::ALT_SEPARATOR }
13
11
 
14
12
  before(:all) do
15
13
  @pid = Process.pid
16
14
  end
17
15
 
18
- it "has a VERSION constant set to the expected value" do
19
- expect(Sys::ProcTable::VERSION).to eql('1.2.6')
20
- expect(Sys::ProcTable::VERSION).to be_frozen
21
- end
16
+ context 'constants' do
17
+ it 'has a VERSION constant set to the expected value' do
18
+ expect(Sys::ProcTable::VERSION).to eql('1.3.0')
19
+ expect(Sys::ProcTable::VERSION).to be_frozen
20
+ end
22
21
 
23
- it "defines a custom error class" do
24
- expect{ Sys::ProcTable::Error }.to_not raise_error
25
- expect(Sys::ProcTable::Error.new).to be_kind_of(StandardError)
22
+ it 'defines a custom error class' do
23
+ expect{ Sys::ProcTable::Error }.not_to raise_error
24
+ expect(Sys::ProcTable::Error.new).to be_kind_of(StandardError)
25
+ end
26
26
  end
27
27
 
28
- context "fields" do
29
- it "has a fields singleton method" do
30
- expect(described_class).to respond_to(:fields)
28
+ context 'fields' do
29
+ it 'has a fields singleton method' do
30
+ expect(Sys::ProcTable).to respond_to(:fields)
31
31
  end
32
32
 
33
- it "returns the expected data type for the fields singleton method" do
34
- expect(described_class.fields).to be_kind_of(Array)
35
- expect(described_class.fields.first).to be_kind_of(String)
33
+ it 'returns the expected data type for the fields singleton method' do
34
+ expect(Sys::ProcTable.fields).to be_kind_of(Array)
35
+ expect(Sys::ProcTable.fields.first).to be_kind_of(String)
36
36
  end
37
37
  end
38
38
 
39
- context "ps" do
40
- it "defines a ps singleton method" do
41
- expect(described_class).to respond_to(:ps)
39
+ context 'ps' do
40
+ it 'defines a ps singleton method' do
41
+ expect(Sys::ProcTable).to respond_to(:ps)
42
42
  end
43
43
 
44
- it "allows a pid option as an argument" do
45
- expect{ described_class.ps(pid: 0) }.to_not raise_error
44
+ it 'allows a pid option as an argument' do
45
+ expect{ Sys::ProcTable.ps(:pid => 0) }.not_to raise_error
46
46
  end
47
47
 
48
- it "allows the pid to be nil" do
49
- expect{ described_class.ps(pid: nil) }.to_not raise_error
50
- expect(described_class.ps(pid: nil)).to be_kind_of(Array)
48
+ it 'allows the pid to be nil' do
49
+ expect{ Sys::ProcTable.ps(:pid => nil) }.not_to raise_error
50
+ expect(Sys::ProcTable.ps(:pid => nil)).to be_kind_of(Array)
51
51
  end
52
52
 
53
- it "returns expected results with no arguments" do
54
- expect(described_class.ps).to be_kind_of(Array)
53
+ it 'returns expected results with no arguments' do
54
+ expect(Sys::ProcTable.ps).to be_kind_of(Array)
55
55
  end
56
56
 
57
- it "returns expected results with a pid argument" do
58
- expect(described_class.ps(pid: @pid)).to be_kind_of(Struct::ProcTableStruct)
57
+ it 'returns expected results with a pid argument' do
58
+ expect(Sys::ProcTable.ps(:pid => @pid)).to be_kind_of(Struct::ProcTableStruct)
59
59
  end
60
60
 
61
- it "returns nil if the process does not exist" do
62
- expect(described_class.ps(pid: 999999999)).to be_nil
61
+ it 'returns nil if the process does not exist' do
62
+ expect(Sys::ProcTable.ps(:pid => 999999999)).to be_nil
63
63
  end
64
64
 
65
- it "returns nil in block form whether or not a pid was provided" do
66
- expect(described_class.ps{}).to be_nil
67
- expect(described_class.ps(pid: 999999999){}).to be_nil
65
+ it 'returns nil in block form whether or not a pid was provided' do
66
+ expect(Sys::ProcTable.ps{}).to be_nil
67
+ expect(Sys::ProcTable.ps(:pid => 999999999){}).to be_nil
68
68
  end
69
69
 
70
- it "returns frozen structs" do
71
- expect(described_class.ps.first.frozen?).to eql(true)
70
+ it 'returns frozen structs' do
71
+ expect(Sys::ProcTable.ps.first.frozen?).to be(true)
72
72
  end
73
73
 
74
- it "expects a numeric pid argument if present" do
75
- expect{ described_class.ps(pid: 'vim') }.to raise_error(TypeError)
74
+ it 'expects a numeric pid argument if present' do
75
+ expect{ Sys::ProcTable.ps(:pid => 'vim') }.to raise_error(TypeError)
76
76
  end
77
77
 
78
- it "accepts keyword arguments only" do
79
- expect{ described_class.ps(0, 'localhost') }.to raise_error(ArgumentError)
78
+ it 'accepts keyword arguments only' do
79
+ expect{ Sys::ProcTable.ps(0, 'localhost') }.to raise_error(ArgumentError)
80
80
  end
81
81
 
82
- it "disables the traditional constructor" do
83
- expect{ described_class.new }.to raise_error(NoMethodError)
82
+ it 'disables the traditional constructor' do
83
+ expect{ Sys::ProcTable.new }.to raise_error(NoMethodError)
84
84
  end
85
85
 
86
- it "works within a thread" do
87
- expect{ Thread.new{ described_class.ps }.value }.to_not raise_error
86
+ it 'works within a thread' do
87
+ expect{ Thread.new{ Sys::ProcTable.ps }.value }.not_to raise_error
88
88
  end
89
89
  end
90
90
  end