of one or more program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use. --Kolawa, Adam; Huizinga, Dorota (2007) 5
of one or more program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use. --Kolawa, Adam; Huizinga, Dorota (2007) 7
beforeEach { rightBarButtonItem = sut.navigationItem.rightBarButtonItem } it("should have a target") { let actual = rightBarButtonItem?.target as? PhotoUploadViewController expect(actual).to(equal(sut)) } it("should have an action") { let expected = #selector(PhotoUploadViewController.onTap(_:)) expect(rightBarButtonItem?.action).to(equal(expected)) } }
such thing as untestable behavior » Think examples/behaviors, not tests » Don’t test implementation, work outside-in » Use ubiquitous language to make examples easily understandable 61