@@ -42,7 +42,9 @@ internal final class OptionRowSpec: QuickSpec {
4242 expect ( row. title) == " title "
4343 expect ( row. subtitle) . to ( beNil ( ) )
4444 expect ( row. isSelected) == true
45- expect ( row. action) . notTo ( beNil ( ) )
45+
46+ row. action ? ( row)
47+ expect ( invoked) == true
4648
4749 // RowStyle
4850 expect ( row. cellReuseIdentifier) == " UITableViewCell "
@@ -51,9 +53,10 @@ internal final class OptionRowSpec: QuickSpec {
5153 expect ( row. accessoryType) == UITableViewCellAccessoryType . checkmark
5254 expect ( row. isSelectable) == true
5355 expect ( row. customize) . to ( beNil ( ) )
56+ }
5457
55- row . action ? ( row )
56- expect ( invoked ) == true
58+ it ( " should conform to the protocol " ) {
59+ expect ( row ) . to ( beAKindOf ( OptionRowCompatible . self ) )
5760 }
5861 }
5962
@@ -103,6 +106,7 @@ internal final class OptionRowSpec: QuickSpec {
103106
104107 it ( " should invoke the action closure " ) {
105108 row. isSelected = true
109+ expect ( row. accessoryType) == UITableViewCellAccessoryType . checkmark
106110 expect ( invoked) . toEventually ( beTrue ( ) )
107111 }
108112 }
@@ -113,6 +117,7 @@ internal final class OptionRowSpec: QuickSpec {
113117
114118 it ( " should not invoke the action closure " ) {
115119 row. isSelected = false
120+ expect ( row. accessoryType) == UITableViewCellAccessoryType . none
116121 expect ( invoked) . toEventually ( beFalse ( ) )
117122 }
118123 }
0 commit comments