# XCTAssertNil definition error in Chpt. 2

**URL:** <https://forums.kodeco.com/t/xctassertnil-definition-error-in-chpt-2/90131>\
**Category:** iOS Test Driven Development by Tutorials\
**Created:** [December 3, 2019, 4:03am UTC](https://forums.kodeco.com/t/xctassertnil-definition-error-in-chpt-2/90131 "2019-12-03T04:03:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arindavoodian](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/arindavoodian/32/81494_2.png) [@arindavoodian](https://forums.kodeco.com/u/arindavoodian)\
**Post date:** [December 3, 2019, 4:03am UTC](https://forums.kodeco.com/t/xctassertnil-definition-error-in-chpt-2/90131/1 "2019-12-03T04:03:23Z")

</div>

Maybe I’m reading this wrong but there seems to be an error in the definition in chapter 2 regarding XCTAssertNil.

Page 28.

“You then attempt to instantiate a new instance of CashRegister, which you pass into XCTAssertNil. This is a test expression that asserts whatever passed to it is not nil. If it actually is nil, the test will be marked as failed”

Excerpt From  
iOS Test-Driven Development by Tutorials  
By Joshua Greene  
This material may be protected by copyright.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [January 13, 2020, 3:39am UTC](https://forums.kodeco.com/t/xctassertnil-definition-error-in-chpt-2/90131/2 "2020-01-13T03:39:13Z")

</div>

@jrg.developer Can you please help with this when you get a chance? Thank you - much appreciated! :]
