26. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
27. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
28. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
29. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
30. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
31. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
let dataSource = RecipientsTableViewDataSource()
let controller = RecipientsViewController(dataSource: dataSource)
let _ = controller.view
// Act: Perform the action that triggers the change we want to test
dataSource.recipients.append(Recipient(name: "Galois"))
// Assert: Confirm the action had the intended effects
XCTAssertEqual(controller.tableView.numberOfRowsInSection(0), 2,
"Expected view controller's table view to contain two cells")
let cellIndexPath = NSIndexPath(forRow: 0, inSection: 0)
let cell = controller.tableView.cellForRowAtIndexPath(cellIndexPath)
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS",
"Expected cell for newly added person would be first in the table")
}
32. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
33. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
34. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
35. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
36. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
37. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
38. func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Arrange: Prepare the view controller
// Act: None in this case
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(cell!.textLabel!.text!, "+")
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(cell!.textLabel!.text!, "GALOIS")
}
func testTableViewAfterAddingPersonStillContainsAddCell() {
// Arrange: Prepare the view controller
// Act: Add a person
XCTAssertEqual(viewController.tableView.numberOfRowsInSection(0), 1)
XCTAssertEqual(lastCell!.textLabel!.text!, "+")
}
39. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
40. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
41. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
42. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
43. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
44. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
45. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
46. class RecipientsViewControllerTests: XCTestCase {
var dataSource: RecipientsTableViewDataSource!
var viewController: RecipientsViewController!
override func setUp() {
// Arrange: Prepare the view controller
dataSource = RecipientsTableViewDataSource()
viewController = RecipientsViewController(dataSource: dataSource)
}
func testTableViewBeforeAddingAnyCellsContainsAddCell() {
// Act: None in this case
// Assert: One cell in table
}
func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
}
52. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
53. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
54. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
55. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
56. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
57. func testTableViewAfterAddingPersonContainsACellForThatPerson() {
// Act: Add a person
// Assert: First cell in table is "GALOIS"
}
func testTableViewWhenFullDoesNotContainAddCell() {
// Arrange: Add 5 people to table
// Act: None in this case
// Assert: Last cell in table view is not "+"
}
func testTableViewWhenFullDoesNotAddPeople() {
// Arrange: Add 5 people to table
// Act: Add another person
// Assert: Still only 5 people in table
}
58. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
59. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
60. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
61. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
62. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
63. var controller: RecipientsViewController!
var dataSource: RecipientsTableViewDataSource!
var fullController: RecipientsViewController!
var fullDataSource: RecipientsTableViewDataSource!
override func setUp() {
// Arrange #1: Prepare the empty view controller
dataSource = RecipientsTableViewDataSource()
controller = RecipientsViewController(dataSource: dataSource)
// Arrange #2: Prepare the full view controller
fullDataSource = RecipientsTableViewDataSource()
fullDataSource.recipients.extend([
Recipient(name: "Galois"),
Recipient(name: "Lagrange"),
Recipient(name: "Gauss"),
Recipient(name: "Riemann"),
Recipient(name: "Poincaré"),
])
fullController = RecipientsViewController(dataSource: fullDataSource)
}
64.
65.
66.
67. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
68. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
69. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
70. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
71. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
72. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
73. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
74. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
75. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
76. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
77. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
78. describe("RecipientsTableViewDataSource") {
var dataSource: RecipientsTableViewDataSource!
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
describe("isFull") {
context("when it contains 5 or fewer people") {
it("returns false") { /* ... */ }
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois"), ...])
}
it("returns true") { /* ... */ }
}
}
}
81. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
82. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
83. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
84. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
85. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
86. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
87. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
88. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
89. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
90. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
91. typealias BeforeEachClosure = () -> ()
class ExampleGroup {
var beforeEachClosures = [BeforeEachClosure]()
var examples = [Example]()
weak var parent: ExampleGroup?
var children = [ExampleGroup]()
}
92. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
93. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
94. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
95. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
96. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
97. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
98. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
99. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
100. typealias ExampleClosure = () -> ()
class Example {
let exampleGroup: ExampleGroup
let closure: ExampleClosure
func run() { runBeforeEach(); closure() }
func runBeforeEach() {
var beforeEachClosures = [BeforeEachClosure]()
var group: ExampleGroup? = exampleGroup
while (group != nil) {
beforeEachClosures.extend(group!.beforeEachClosures.reverse())
group = group!.parent
}
for closure in beforeEachClosures.reverse() { closure() }
}
}
101. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
102. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
103. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}
104. describe("isFull") {
beforeEach {
dataSource = RecipientsTableViewDataSource()
}
context("when it contains 5 or fewer people") {
it("returns false") {
XCTAssertFalse(dataSource.isFull)
}
}
context("when it contains 6 or more people") {
beforeEach {
dataSource.recipients.extend([Recipient(name: "Galois")])
}
it("returns true") {
XCTAssert(dataSource.isFull)
}
}
}