ActionSheetCancelButtonTests.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // ActionSheetCancelButtonTests.swift
  3. // Sheeeeeeeeet
  4. //
  5. // Created by Daniel Saidi on 2017-11-26.
  6. // Copyright © 2017 Daniel Saidi. All rights reserved.
  7. //
  8. import Quick
  9. import Nimble
  10. import Sheeeeeeeeet
  11. class ActionSheetCancelButtonTests: QuickSpec {
  12. override func spec() {
  13. var item: ActionSheetCancelButton!
  14. beforeEach {
  15. item = ActionSheetCancelButton(title: "cancel")
  16. }
  17. describe("created instance") {
  18. it("is correctly setup") {
  19. expect(item.title).to(equal("cancel"))
  20. expect(item.value as? ActionSheetButton.ButtonType).to(equal(.cancel))
  21. }
  22. }
  23. describe("cell") {
  24. it("is of correct type") {
  25. let cell = item.cell(for: UITableView())
  26. expect(cell is ActionSheetCancelButtonCell).to(beTrue())
  27. expect(cell.reuseIdentifier).to(equal(item.cellReuseIdentifier))
  28. }
  29. }
  30. }
  31. }