Skip to content

Commit 8780bd1

Browse files
authored
Merge pull request #6 from herwinw/assert_kind_of
Use assert_kind_of instead of if + assert(false)
2 parents 592a4df + cda29bd commit 8780bd1

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

test/test_parser.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ def test_parseMethodCall
6060

6161
def test_fault
6262
flag, fault = @p.parseMethodResponse(@fault_doc)
63-
assert_equal(flag, false)
64-
unless fault.is_a? XMLRPC::FaultException
65-
assert(false, "must be an instance of class XMLRPC::FaultException")
66-
end
67-
assert_equal(fault.faultCode, 4)
68-
assert_equal(fault.faultString, "an error message")
63+
assert_equal(flag, false)
64+
assert_kind_of(XMLRPC::FaultException, fault, "must be an instance of class XMLRPC::FaultException")
65+
assert_equal(fault.faultCode, 4)
66+
assert_equal(fault.faultString, "an error message")
6967
end
7068

7169
def test_fault_message

0 commit comments

Comments
 (0)