Skip to content

Commit 9cadded

Browse files
committed
Prefer dedicated assertions
1 parent 7f858ef commit 9cadded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/etc/test_etc.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_passwd
2121
assert_instance_of(String, s.shell)
2222
assert_kind_of(Integer, s.change) if s.respond_to?(:change)
2323
assert_kind_of(Integer, s.quota) if s.respond_to?(:quota)
24-
assert(s.age.is_a?(Integer) || s.age.is_a?(String)) if s.respond_to?(:age)
24+
assert(s.age.is_a?(Integer) || s.age.is_a?(String), s.age) if s.respond_to?(:age)
2525
assert_instance_of(String, s.uclass) if s.respond_to?(:uclass)
2626
assert_instance_of(String, s.comment) if s.respond_to?(:comment)
2727
assert_kind_of(Integer, s.expire) if s.respond_to?(:expire)
@@ -160,7 +160,7 @@ def test_pathconf
160160
end
161161
IO.pipe {|r, w|
162162
val = w.pathconf(Etc::PC_PIPE_BUF)
163-
assert(val.nil? || val.kind_of?(Integer))
163+
assert_kind_of(Integer, val) if val
164164
}
165165
end if defined?(Etc::PC_PIPE_BUF)
166166

0 commit comments

Comments
 (0)