spec/unit/tables/table_screen_spec.rb in ProMotion-0.7.3 vs spec/unit/tables/table_screen_spec.rb in ProMotion-0.7.4

- old
+ new

@@ -13,10 +13,11 @@ it "should have proper cell numbers" do @screen.tableView(@screen.tableView, numberOfRowsInSection:0).should == 6 @screen.tableView(@screen.tableView, numberOfRowsInSection:1).should == 2 @screen.tableView(@screen.tableView, numberOfRowsInSection:2).should == 4 + @screen.tableView(@screen.tableView, numberOfRowsInSection:3).should == 3 end it "should return a UITableViewCell" do index_path = NSIndexPath.indexPathForRow(1, inSection: 1) @@ -28,13 +29,11 @@ @screen.tableView(@screen.tableView, cellForRowAtIndexPath: index_path).imageView.should.be.kind_of UIImageView end it "should display all images properly no matter how they were initialized" do - section = @screen.promotion_table_data.sections.count - 1 # All the cells we want to test are in the last section - - @screen.tableView(@screen.tableView, numberOfRowsInSection:section).times do |i| - index_path = NSIndexPath.indexPathForRow(i, inSection: section) + @screen.tableView(@screen.tableView, numberOfRowsInSection:2).times do |i| + index_path = NSIndexPath.indexPathForRow(i, inSection:2) @screen.tableView(@screen.tableView, cellForRowAtIndexPath: index_path).imageView.should.be.kind_of UIImageView # Test the corner radius on the first cell. if i == 0