spec/unit/tables/table_module_spec.rb in ProMotion-2.2.0 vs spec/unit/tables/table_module_spec.rb in ProMotion-2.2.1

- old
+ new

@@ -41,11 +41,11 @@ }) end def default_cell_height return UITableViewAutomaticDimension if TestHelper.ios8 - return 44.0 if TestHelper.ios7 + return 97.0 if TestHelper.ios7 # Normally 44, but 97 because of `row_height` designation end def default_header_height # Thanks, Apple. return -1.0 if TestHelper.ios8 @@ -138,11 +138,10 @@ ip = NSIndexPath.indexPathForRow(0, inSection: 6) @subject.tableView(@subject.table_view, didSelectRowAtIndexPath:ip) tapped_ip = @subject.got_index_path - tapped_ip.should.be.kind_of NSIndexPath tapped_ip.section.should == 6 tapped_ip.row.should == 0 end # TODO - make this test work when MacBacon supports long press gestures @@ -189,8 +188,12 @@ it "should use the set title_view_height if one is specified" do @subject.tableView(@subject.table_view, heightForHeaderInSection:5).should == 50.0 end + it "should use the instantiated section view if one is specified" do + cell = @subject.tableView(@subject.table_view, viewForHeaderInSection: 5) + cell.should.be.kind_of(CustomTitleView) + end end end