Skip to content

Commit 0947e13

Browse files
committed
Use assert_kind_of instead of if statement
This is more suitable, and pushes the coverage to 100% (acccording to simplecov)
1 parent 0827f75 commit 0947e13

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

test/test_parser.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ def test_parseMethodCall
6161
def test_fault
6262
flag, fault = @p.parseMethodResponse(@fault_doc)
6363
assert_equal(flag, false)
64-
unless fault.is_a? XMLRPC::FaultException
65-
assert(false, "must be an instance of class XMLRPC::FaultException")
66-
end
64+
assert_kind_of(XMLRPC::FaultException, fault, "must be an instance of class XMLRPC::FaultException")
6765
assert_equal(fault.faultCode, 4)
6866
assert_equal(fault.faultString, "an error message")
6967
end

0 commit comments

Comments
 (0)