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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/{CHANGES.rdoc → CHANGES.md} +69 -49
- data/Gemfile +2 -0
- data/{MANIFEST.rdoc → MANIFEST.md} +9 -1
- data/README.md +9 -3
- data/Rakefile +10 -7
- data/certs/djberg96_pub.pem +26 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/constants.rb +11 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/functions.rb +14 -0
- data/lib/bsd/sys/dragonfly/sys/proctable/structs.rb +298 -0
- data/lib/bsd/sys/dragonfly/sys/proctable.rb +175 -0
- data/lib/bsd/sys/freebsd/sys/proctable/constants.rb +0 -0
- data/lib/bsd/sys/freebsd/sys/proctable/functions.rb +0 -0
- data/lib/bsd/sys/freebsd/sys/proctable/structs.rb +0 -0
- data/lib/{freebsd → bsd/sys/freebsd}/sys/proctable.rb +1 -1
- data/lib/bsd/sys/proctable.rb +8 -0
- data/lib/darwin/sys/proctable.rb +53 -20
- data/lib/linux/sys/proctable/cgroup_entry.rb +4 -2
- data/lib/linux/sys/proctable/smaps.rb +29 -17
- data/lib/linux/sys/proctable.rb +41 -35
- data/lib/sunos/sys/proctable.rb +2 -2
- data/lib/sys/proctable/version.rb +1 -1
- data/lib/sys/proctable.rb +2 -2
- data/lib/sys/top.rb +7 -2
- data/lib/windows/sys/proctable.rb +36 -32
- data/spec/spec_helper.rb +15 -0
- data/spec/sys_proctable_aix_spec.rb +74 -76
- data/spec/sys_proctable_all_spec.rb +45 -45
- data/spec/sys_proctable_bsd_spec.rb +244 -0
- data/spec/sys_proctable_darwin_spec.rb +85 -58
- data/spec/sys_proctable_linux_spec.rb +196 -195
- data/spec/sys_proctable_sunos_spec.rb +190 -192
- data/spec/sys_proctable_windows_spec.rb +153 -153
- data/spec/sys_top_spec.rb +20 -21
- data/sys-proctable.gemspec +16 -24
- data.tar.gz.sig +0 -0
- metadata +78 -18
- metadata.gz.sig +0 -0
- data/spec/sys_proctable_freebsd_spec.rb +0 -210
@@ -1,15 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#######################################################################
|
2
4
|
# sys_proctable_linux_spec.rb
|
3
5
|
#
|
4
6
|
# Test suite for the Linux version of the sys-proctable library. You
|
5
|
-
# should run these tests via the 'rake
|
7
|
+
# should run these tests via the 'rake spec' task.
|
6
8
|
#######################################################################
|
7
|
-
require '
|
8
|
-
require 'sys/proctable'
|
9
|
-
require_relative 'sys_proctable_all_spec'
|
9
|
+
require 'spec_helper'
|
10
10
|
|
11
|
-
describe Sys::ProcTable do
|
12
|
-
let(:fields){
|
11
|
+
RSpec.describe Sys::ProcTable, :linux do
|
12
|
+
let(:fields){
|
13
|
+
%w[
|
13
14
|
cmdline cwd environ exe fd root pid name uid euid gid egid comm state ppid pgrp
|
14
15
|
session tty_nr tpgid flags minflt cminflt majflt cmajflt utime
|
15
16
|
stime cutime cstime priority nice num_threads itrealvalue starttime vsize
|
@@ -19,318 +20,318 @@ describe Sys::ProcTable do
|
|
19
20
|
]
|
20
21
|
}
|
21
22
|
|
22
|
-
context
|
23
|
-
subject
|
23
|
+
before(:context) do
|
24
|
+
@subject ||= described_class.ps.last
|
25
|
+
end
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
expect(subject
|
27
|
+
context 'struct members' do
|
28
|
+
it 'contains a cmdline member and returns the expected value' do
|
29
|
+
expect(@subject).to respond_to(:cmdline)
|
30
|
+
expect(@subject.cmdline).to be_kind_of(String)
|
28
31
|
end
|
29
32
|
|
30
|
-
it
|
31
|
-
expect(subject).to respond_to(:cwd)
|
32
|
-
expect(subject.cwd).to be_kind_of(String) if subject.cwd
|
33
|
+
it 'contains a cwd member and returns the expected value' do
|
34
|
+
expect(@subject).to respond_to(:cwd)
|
35
|
+
expect(@subject.cwd).to be_kind_of(String) if @subject.cwd
|
33
36
|
end
|
34
37
|
|
35
|
-
it
|
36
|
-
expect(subject).to respond_to(:environ)
|
37
|
-
expect(subject.environ).to be_kind_of(Hash)
|
38
|
+
it 'contains a environ member and returns the expected value' do
|
39
|
+
expect(@subject).to respond_to(:environ)
|
40
|
+
expect(@subject.environ).to be_kind_of(Hash)
|
38
41
|
end
|
39
42
|
|
40
|
-
it
|
41
|
-
expect(subject).to respond_to(:exe)
|
42
|
-
expect(subject.exe).to be_kind_of(String) if subject.exe
|
43
|
+
it 'contains an exe member and returns the expected value' do
|
44
|
+
expect(@subject).to respond_to(:exe)
|
45
|
+
expect(@subject.exe).to be_kind_of(String) if @subject.exe
|
43
46
|
end
|
44
47
|
|
45
|
-
it
|
46
|
-
expect(subject).to respond_to(:fd)
|
47
|
-
expect(subject.fd).to be_kind_of(Hash)
|
48
|
+
it 'contains an fd member and returns the expected value' do
|
49
|
+
expect(@subject).to respond_to(:fd)
|
50
|
+
expect(@subject.fd).to be_kind_of(Hash)
|
48
51
|
end
|
49
52
|
|
50
|
-
it
|
51
|
-
expect(subject).to respond_to(:root)
|
52
|
-
expect(subject.root).to be_kind_of(String) if subject.root
|
53
|
+
it 'contains a root member and returns the expected value' do
|
54
|
+
expect(@subject).to respond_to(:root)
|
55
|
+
expect(@subject.root).to be_kind_of(String) if @subject.root
|
53
56
|
end
|
54
57
|
|
55
|
-
it
|
56
|
-
expect(subject).to respond_to(:pid)
|
57
|
-
expect(subject.pid).to be_kind_of(Integer)
|
58
|
+
it 'contains a pid member and returns the expected value' do
|
59
|
+
expect(@subject).to respond_to(:pid)
|
60
|
+
expect(@subject.pid).to be_kind_of(Integer)
|
58
61
|
end
|
59
62
|
|
60
|
-
it
|
61
|
-
expect(subject).to respond_to(:comm)
|
62
|
-
expect(subject.comm).to be_kind_of(String)
|
63
|
+
it 'contains a comm member and returns the expected value' do
|
64
|
+
expect(@subject).to respond_to(:comm)
|
65
|
+
expect(@subject.comm).to be_kind_of(String)
|
63
66
|
end
|
64
67
|
|
65
|
-
it
|
66
|
-
expect(subject).to respond_to(:state)
|
67
|
-
expect(subject.state).to be_kind_of(String)
|
68
|
+
it 'contains a state member and returns the expected value' do
|
69
|
+
expect(@subject).to respond_to(:state)
|
70
|
+
expect(@subject.state).to be_kind_of(String)
|
68
71
|
end
|
69
72
|
|
70
|
-
it
|
71
|
-
expect(subject).to respond_to(:
|
72
|
-
expect(subject.
|
73
|
+
it 'contains a ppid member and returns the expected value' do
|
74
|
+
expect(@subject).to respond_to(:ppid)
|
75
|
+
expect(@subject.ppid).to be_kind_of(Integer)
|
73
76
|
end
|
74
77
|
|
75
|
-
it
|
76
|
-
expect(subject).to respond_to(:pgrp)
|
77
|
-
expect(subject.pgrp).to be_kind_of(Integer)
|
78
|
+
it 'contains a pgrp member and returns the expected value' do
|
79
|
+
expect(@subject).to respond_to(:pgrp)
|
80
|
+
expect(@subject.pgrp).to be_kind_of(Integer)
|
78
81
|
end
|
79
82
|
|
80
|
-
it
|
81
|
-
expect(subject).to respond_to(:session)
|
82
|
-
expect(subject.session).to be_kind_of(Integer)
|
83
|
+
it 'contains a session member and returns the expected value' do
|
84
|
+
expect(@subject).to respond_to(:session)
|
85
|
+
expect(@subject.session).to be_kind_of(Integer)
|
83
86
|
end
|
84
87
|
|
85
|
-
it
|
86
|
-
expect(subject).to respond_to(:tty_nr)
|
87
|
-
expect(subject.tty_nr).to be_kind_of(Integer)
|
88
|
+
it 'contains a tty_nr member and returns the expected value' do
|
89
|
+
expect(@subject).to respond_to(:tty_nr)
|
90
|
+
expect(@subject.tty_nr).to be_kind_of(Integer)
|
88
91
|
end
|
89
92
|
|
90
|
-
it
|
91
|
-
expect(subject).to respond_to(:tpgid)
|
92
|
-
expect(subject.tpgid).to be_kind_of(Integer)
|
93
|
+
it 'contains a tpgid member and returns the expected value' do
|
94
|
+
expect(@subject).to respond_to(:tpgid)
|
95
|
+
expect(@subject.tpgid).to be_kind_of(Integer)
|
93
96
|
end
|
94
97
|
|
95
|
-
it
|
96
|
-
expect(subject).to respond_to(:flags)
|
97
|
-
expect(subject.flags).to be_kind_of(Numeric)
|
98
|
+
it 'contains a flags member and returns the expected value' do
|
99
|
+
expect(@subject).to respond_to(:flags)
|
100
|
+
expect(@subject.flags).to be_kind_of(Numeric)
|
98
101
|
end
|
99
102
|
|
100
|
-
it
|
101
|
-
expect(subject).to respond_to(:minflt)
|
102
|
-
expect(subject.minflt).to be_kind_of(Numeric)
|
103
|
+
it 'contains a minflt member and returns the expected value' do
|
104
|
+
expect(@subject).to respond_to(:minflt)
|
105
|
+
expect(@subject.minflt).to be_kind_of(Numeric)
|
103
106
|
end
|
104
107
|
|
105
|
-
it
|
106
|
-
expect(subject).to respond_to(:cminflt)
|
107
|
-
expect(subject.cminflt).to be_kind_of(Numeric)
|
108
|
+
it 'contains a cminflt member and returns the expected value' do
|
109
|
+
expect(@subject).to respond_to(:cminflt)
|
110
|
+
expect(@subject.cminflt).to be_kind_of(Numeric)
|
108
111
|
end
|
109
112
|
|
110
|
-
it
|
111
|
-
expect(subject).to respond_to(:majflt)
|
112
|
-
expect(subject.majflt).to be_kind_of(Numeric)
|
113
|
+
it 'contains a majflt member and returns the expected value' do
|
114
|
+
expect(@subject).to respond_to(:majflt)
|
115
|
+
expect(@subject.majflt).to be_kind_of(Numeric)
|
113
116
|
end
|
114
117
|
|
115
|
-
it
|
116
|
-
expect(subject).to respond_to(:cmajflt)
|
117
|
-
expect(subject.cmajflt).to be_kind_of(Numeric)
|
118
|
+
it 'contains a cmajflt member and returns the expected value' do
|
119
|
+
expect(@subject).to respond_to(:cmajflt)
|
120
|
+
expect(@subject.cmajflt).to be_kind_of(Numeric)
|
118
121
|
end
|
119
122
|
|
120
|
-
it
|
121
|
-
expect(subject).to respond_to(:utime)
|
122
|
-
expect(subject.utime).to be_kind_of(Numeric)
|
123
|
+
it 'contains a utime member and returns the expected value' do
|
124
|
+
expect(@subject).to respond_to(:utime)
|
125
|
+
expect(@subject.utime).to be_kind_of(Numeric)
|
123
126
|
end
|
124
127
|
|
125
|
-
it
|
126
|
-
expect(subject).to respond_to(:stime)
|
127
|
-
expect(subject.stime).to be_kind_of(Numeric)
|
128
|
+
it 'contains a stime member and returns the expected value' do
|
129
|
+
expect(@subject).to respond_to(:stime)
|
130
|
+
expect(@subject.stime).to be_kind_of(Numeric)
|
128
131
|
end
|
129
132
|
|
130
|
-
it
|
131
|
-
expect(subject).to respond_to(:cutime)
|
132
|
-
expect(subject.cutime).to be_kind_of(Numeric)
|
133
|
+
it 'contains a cutime member and returns the expected value' do
|
134
|
+
expect(@subject).to respond_to(:cutime)
|
135
|
+
expect(@subject.cutime).to be_kind_of(Numeric)
|
133
136
|
end
|
134
137
|
|
135
|
-
it
|
136
|
-
expect(subject).to respond_to(:cstime)
|
137
|
-
expect(subject.cstime).to be_kind_of(Numeric)
|
138
|
+
it 'contains a cstime member and returns the expected value' do
|
139
|
+
expect(@subject).to respond_to(:cstime)
|
140
|
+
expect(@subject.cstime).to be_kind_of(Numeric)
|
138
141
|
end
|
139
142
|
|
140
|
-
it
|
141
|
-
expect(subject).to respond_to(:priority)
|
142
|
-
expect(subject.priority).to be_kind_of(Numeric)
|
143
|
+
it 'contains a priority member and returns the expected value' do
|
144
|
+
expect(@subject).to respond_to(:priority)
|
145
|
+
expect(@subject.priority).to be_kind_of(Numeric)
|
143
146
|
end
|
144
147
|
|
145
|
-
it
|
146
|
-
expect(subject).to respond_to(:nice)
|
147
|
-
expect(subject.nice).to be_kind_of(Numeric)
|
148
|
+
it 'contains a nice member and returns the expected value' do
|
149
|
+
expect(@subject).to respond_to(:nice)
|
150
|
+
expect(@subject.nice).to be_kind_of(Numeric)
|
148
151
|
end
|
149
152
|
|
150
|
-
it
|
151
|
-
expect(subject).to respond_to(:num_threads)
|
152
|
-
expect(subject.num_threads).to be_kind_of(Numeric)
|
153
|
+
it 'contains a num_threads member and returns the expected value' do
|
154
|
+
expect(@subject).to respond_to(:num_threads)
|
155
|
+
expect(@subject.num_threads).to be_kind_of(Numeric)
|
153
156
|
end
|
154
157
|
|
155
|
-
it
|
156
|
-
expect(subject).to respond_to(:itrealvalue)
|
157
|
-
expect(subject.itrealvalue).to be_kind_of(Numeric)
|
158
|
+
it 'contains a itrealvalue member and returns the expected value' do
|
159
|
+
expect(@subject).to respond_to(:itrealvalue)
|
160
|
+
expect(@subject.itrealvalue).to be_kind_of(Numeric)
|
158
161
|
end
|
159
162
|
|
160
|
-
it
|
161
|
-
expect(subject).to respond_to(:starttime)
|
162
|
-
expect(subject.starttime).to be_kind_of(Numeric)
|
163
|
+
it 'contains a starttime member and returns the expected value' do
|
164
|
+
expect(@subject).to respond_to(:starttime)
|
165
|
+
expect(@subject.starttime).to be_kind_of(Numeric)
|
163
166
|
end
|
164
167
|
|
165
|
-
it
|
166
|
-
expect(subject).to respond_to(:vsize)
|
167
|
-
expect(subject.vsize).to be_kind_of(Numeric)
|
168
|
+
it 'contains a vsize member and returns the expected value' do
|
169
|
+
expect(@subject).to respond_to(:vsize)
|
170
|
+
expect(@subject.vsize).to be_kind_of(Numeric)
|
168
171
|
end
|
169
172
|
|
170
|
-
it
|
171
|
-
expect(subject).to respond_to(:rss)
|
172
|
-
expect(subject.rss).to be_kind_of(Numeric)
|
173
|
+
it 'contains a rss member and returns the expected value' do
|
174
|
+
expect(@subject).to respond_to(:rss)
|
175
|
+
expect(@subject.rss).to be_kind_of(Numeric)
|
173
176
|
end
|
174
177
|
|
175
|
-
it
|
176
|
-
expect(subject).to respond_to(:rsslim)
|
177
|
-
expect(subject.rsslim).to be_kind_of(Numeric)
|
178
|
-
expect(subject.rsslim).to eq(subject.rlim)
|
178
|
+
it 'contains an rsslim member and returns the expected value' do
|
179
|
+
expect(@subject).to respond_to(:rsslim)
|
180
|
+
expect(@subject.rsslim).to be_kind_of(Numeric)
|
181
|
+
expect(@subject.rsslim).to eq(@subject.rlim)
|
179
182
|
end
|
180
183
|
|
181
|
-
it
|
182
|
-
expect(subject).to respond_to(:startcode)
|
183
|
-
expect(subject.startcode).to be_kind_of(Numeric)
|
184
|
+
it 'contains an startcode member and returns the expected value' do
|
185
|
+
expect(@subject).to respond_to(:startcode)
|
186
|
+
expect(@subject.startcode).to be_kind_of(Numeric)
|
184
187
|
end
|
185
188
|
|
186
|
-
it
|
187
|
-
expect(subject).to respond_to(:endcode)
|
188
|
-
expect(subject.endcode).to be_kind_of(Numeric)
|
189
|
+
it 'contains an endcode member and returns the expected value' do
|
190
|
+
expect(@subject).to respond_to(:endcode)
|
191
|
+
expect(@subject.endcode).to be_kind_of(Numeric)
|
189
192
|
end
|
190
193
|
|
191
|
-
it
|
192
|
-
expect(subject).to respond_to(:startstack)
|
193
|
-
expect(subject.startstack).to be_kind_of(Integer)
|
194
|
+
it 'contains a startstack member and returns the expected value' do
|
195
|
+
expect(@subject).to respond_to(:startstack)
|
196
|
+
expect(@subject.startstack).to be_kind_of(Integer)
|
194
197
|
end
|
195
198
|
|
196
|
-
it
|
197
|
-
expect(subject).to respond_to(:kstkesp)
|
198
|
-
expect(subject.kstkesp).to be_kind_of(Integer)
|
199
|
+
it 'contains a kstkesp member and returns the expected value' do
|
200
|
+
expect(@subject).to respond_to(:kstkesp)
|
201
|
+
expect(@subject.kstkesp).to be_kind_of(Integer)
|
199
202
|
end
|
200
203
|
|
201
|
-
it
|
202
|
-
expect(subject).to respond_to(:kstkeip)
|
203
|
-
expect(subject.kstkeip).to be_kind_of(Integer)
|
204
|
+
it 'contains a kstkeip member and returns the expected value' do
|
205
|
+
expect(@subject).to respond_to(:kstkeip)
|
206
|
+
expect(@subject.kstkeip).to be_kind_of(Integer)
|
204
207
|
end
|
205
208
|
|
206
|
-
it
|
207
|
-
expect(subject).to respond_to(:signal)
|
208
|
-
expect(subject.signal).to be_kind_of(Integer)
|
209
|
+
it 'contains a signal member and returns the expected value' do
|
210
|
+
expect(@subject).to respond_to(:signal)
|
211
|
+
expect(@subject.signal).to be_kind_of(Integer)
|
209
212
|
end
|
210
213
|
|
211
|
-
it
|
212
|
-
expect(subject).to respond_to(:blocked)
|
213
|
-
expect(subject.blocked).to be_kind_of(Integer)
|
214
|
+
it 'contains a blocked member and returns the expected value' do
|
215
|
+
expect(@subject).to respond_to(:blocked)
|
216
|
+
expect(@subject.blocked).to be_kind_of(Integer)
|
214
217
|
end
|
215
218
|
|
216
|
-
it
|
217
|
-
expect(subject).to respond_to(:sigignore)
|
218
|
-
expect(subject.sigignore).to be_kind_of(Integer)
|
219
|
+
it 'contains a sigignore member and returns the expected value' do
|
220
|
+
expect(@subject).to respond_to(:sigignore)
|
221
|
+
expect(@subject.sigignore).to be_kind_of(Integer)
|
219
222
|
end
|
220
223
|
|
221
|
-
it
|
222
|
-
expect(subject).to respond_to(:sigcatch)
|
223
|
-
expect(subject.sigcatch).to be_kind_of(Integer)
|
224
|
+
it 'contains a sigcatch member and returns the expected value' do
|
225
|
+
expect(@subject).to respond_to(:sigcatch)
|
226
|
+
expect(@subject.sigcatch).to be_kind_of(Integer)
|
224
227
|
end
|
225
228
|
|
226
|
-
it
|
227
|
-
expect(subject).to respond_to(:wchan)
|
228
|
-
expect(subject.wchan).to be_kind_of(Integer)
|
229
|
+
it 'contains a wchan member and returns the expected value' do
|
230
|
+
expect(@subject).to respond_to(:wchan)
|
231
|
+
expect(@subject.wchan).to be_kind_of(Integer)
|
229
232
|
end
|
230
233
|
|
231
|
-
it
|
232
|
-
expect(subject).to respond_to(:nswap)
|
233
|
-
expect(subject.nswap).to be_kind_of(Integer)
|
234
|
+
it 'contains a nswap member and returns the expected value' do
|
235
|
+
expect(@subject).to respond_to(:nswap)
|
236
|
+
expect(@subject.nswap).to be_kind_of(Integer)
|
234
237
|
end
|
235
238
|
|
236
|
-
it
|
237
|
-
expect(subject).to respond_to(:cnswap)
|
238
|
-
expect(subject.cnswap).to be_kind_of(Integer)
|
239
|
+
it 'contains a cnswap member and returns the expected value' do
|
240
|
+
expect(@subject).to respond_to(:cnswap)
|
241
|
+
expect(@subject.cnswap).to be_kind_of(Integer)
|
239
242
|
end
|
240
243
|
|
241
|
-
it
|
242
|
-
expect(subject).to respond_to(:exit_signal)
|
243
|
-
expect(subject.exit_signal).to be_kind_of(Integer)
|
244
|
+
it 'contains a exit_signal member and returns the expected value' do
|
245
|
+
expect(@subject).to respond_to(:exit_signal)
|
246
|
+
expect(@subject.exit_signal).to be_kind_of(Integer)
|
244
247
|
end
|
245
248
|
|
246
|
-
it
|
247
|
-
expect(subject).to respond_to(:processor)
|
248
|
-
expect(subject.processor).to be_kind_of(Integer)
|
249
|
+
it 'contains a processor member and returns the expected value' do
|
250
|
+
expect(@subject).to respond_to(:processor)
|
251
|
+
expect(@subject.processor).to be_kind_of(Integer)
|
249
252
|
end
|
250
253
|
|
251
|
-
it
|
252
|
-
expect(subject).to respond_to(:rt_priority)
|
253
|
-
expect(subject.rt_priority).to be_kind_of(Integer)
|
254
|
+
it 'contains a rt_priority member and returns the expected value' do
|
255
|
+
expect(@subject).to respond_to(:rt_priority)
|
256
|
+
expect(@subject.rt_priority).to be_kind_of(Integer)
|
254
257
|
end
|
255
258
|
|
256
|
-
it
|
257
|
-
expect(subject).to respond_to(:policy)
|
258
|
-
expect(subject.policy).to be_kind_of(Integer)
|
259
|
+
it 'contains a policy member and returns the expected value' do
|
260
|
+
expect(@subject).to respond_to(:policy)
|
261
|
+
expect(@subject.policy).to be_kind_of(Integer)
|
259
262
|
end
|
260
263
|
|
261
|
-
it
|
262
|
-
expect(subject).to respond_to(:delayacct_blkio_ticks)
|
263
|
-
expect(subject.delayacct_blkio_ticks).to be_kind_of(Integer)
|
264
|
+
it 'contains a delayacct_blkio_ticks member and returns the expected value' do
|
265
|
+
expect(@subject).to respond_to(:delayacct_blkio_ticks)
|
266
|
+
expect(@subject.delayacct_blkio_ticks).to be_kind_of(Integer)
|
264
267
|
end
|
265
268
|
|
266
|
-
it
|
267
|
-
expect(subject).to respond_to(:guest_time)
|
268
|
-
expect(subject.guest_time).to be_kind_of(Integer)
|
269
|
+
it 'contains a guest_time member and returns the expected value' do
|
270
|
+
expect(@subject).to respond_to(:guest_time)
|
271
|
+
expect(@subject.guest_time).to be_kind_of(Integer)
|
269
272
|
end
|
270
273
|
|
271
|
-
it
|
272
|
-
expect(subject).to respond_to(:cguest_time)
|
273
|
-
expect(subject.cguest_time).to be_kind_of(Integer)
|
274
|
+
it 'contains a cguest_time member and returns the expected value' do
|
275
|
+
expect(@subject).to respond_to(:cguest_time)
|
276
|
+
expect(@subject.cguest_time).to be_kind_of(Integer)
|
274
277
|
end
|
275
278
|
|
276
|
-
it
|
277
|
-
expect(subject).to respond_to(:name)
|
278
|
-
expect(subject.name).to be_kind_of(String)
|
279
|
+
it 'contains a name member and returns the expected value' do
|
280
|
+
expect(@subject).to respond_to(:name)
|
281
|
+
expect(@subject.name).to be_kind_of(String)
|
279
282
|
end
|
280
283
|
|
281
|
-
it
|
282
|
-
expect(subject).to respond_to(:uid)
|
283
|
-
expect(subject.uid).to be_kind_of(Integer)
|
284
|
+
it 'contains a uid member and returns the expected value' do
|
285
|
+
expect(@subject).to respond_to(:uid)
|
286
|
+
expect(@subject.uid).to be_kind_of(Integer)
|
284
287
|
end
|
285
288
|
|
286
|
-
it
|
287
|
-
expect(subject).to respond_to(:euid)
|
288
|
-
expect(subject.euid).to be_kind_of(Integer)
|
289
|
+
it 'contains a euid member and returns the expected value' do
|
290
|
+
expect(@subject).to respond_to(:euid)
|
291
|
+
expect(@subject.euid).to be_kind_of(Integer)
|
289
292
|
end
|
290
293
|
|
291
|
-
it
|
292
|
-
expect(subject).to respond_to(:gid)
|
293
|
-
expect(subject.gid).to be_kind_of(Integer)
|
294
|
+
it 'contains a gid member and returns the expected value' do
|
295
|
+
expect(@subject).to respond_to(:gid)
|
296
|
+
expect(@subject.gid).to be_kind_of(Integer)
|
294
297
|
end
|
295
298
|
|
296
|
-
it
|
297
|
-
expect(subject).to respond_to(:egid)
|
298
|
-
expect(subject.egid).to be_kind_of(Integer)
|
299
|
+
it 'contains a egid member and returns the expected value' do
|
300
|
+
expect(@subject).to respond_to(:egid)
|
301
|
+
expect(@subject.egid).to be_kind_of(Integer)
|
299
302
|
end
|
300
303
|
|
301
|
-
it
|
302
|
-
expect(subject).to respond_to(:pctmem)
|
303
|
-
expect(subject.pctmem).to be_kind_of(Float)
|
304
|
+
it 'contains a pctmem member and returns the expected value' do
|
305
|
+
expect(@subject).to respond_to(:pctmem)
|
306
|
+
expect(@subject.pctmem).to be_kind_of(Float)
|
304
307
|
end
|
305
308
|
|
306
|
-
it
|
307
|
-
expect(subject).to respond_to(:pctcpu)
|
308
|
-
expect(subject.pctcpu).to be_kind_of(Float)
|
309
|
+
it 'contains a pctcpu member and returns the expected value' do
|
310
|
+
expect(@subject).to respond_to(:pctcpu)
|
311
|
+
expect(@subject.pctcpu).to be_kind_of(Float)
|
309
312
|
end
|
310
313
|
|
311
|
-
it
|
312
|
-
expect(subject).to respond_to(:nlwp)
|
313
|
-
expect(subject.nlwp).to be_kind_of(Integer)
|
314
|
+
it 'contains a nlwp member and returns the expected value' do
|
315
|
+
expect(@subject).to respond_to(:nlwp)
|
316
|
+
expect(@subject.nlwp).to be_kind_of(Integer)
|
314
317
|
end
|
315
318
|
end
|
316
319
|
|
317
|
-
context
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
expect(subject).to
|
322
|
-
expect(subject.cgroup).to be_kind_of(Array)
|
323
|
-
expect(subject.cgroup.first).to be_kind_of(Sys::ProcTable::CgroupEntry)
|
320
|
+
context 'custom structs' do
|
321
|
+
it 'contains a cgroup member and returns the expected value' do
|
322
|
+
expect(@subject).to respond_to(:cgroup)
|
323
|
+
expect(@subject.cgroup).to be_kind_of(Array)
|
324
|
+
expect(@subject.cgroup.first).to be_kind_of(Sys::ProcTable::CgroupEntry)
|
324
325
|
end
|
325
326
|
|
326
|
-
it
|
327
|
-
expect(subject).to respond_to(:cgroup)
|
328
|
-
expect(subject.smaps).to be_kind_of(Sys::ProcTable::Smaps)
|
327
|
+
it 'contains a smaps member and returns the expected value' do
|
328
|
+
expect(@subject).to respond_to(:cgroup)
|
329
|
+
expect(@subject.smaps).to be_kind_of(Sys::ProcTable::Smaps)
|
329
330
|
end
|
330
331
|
end
|
331
332
|
|
332
|
-
context
|
333
|
-
it
|
333
|
+
context 'fields' do
|
334
|
+
it 'has a fields method that returns the expected results' do
|
334
335
|
expect(described_class).to respond_to(:fields)
|
335
336
|
expect(described_class.fields).to be_kind_of(Array)
|
336
337
|
expect(described_class.fields).to match_array(fields)
|