Sha256: 565451985d459b2fa20a984c0db7b57dd1de25df6baf16c50cbddb4d1f46f73e
Contents?: true
Size: 1.85 KB
Versions: 20
Compression:
Stored size: 1.85 KB
Contents
describe "ProMotion::TableScreen updating functionality" do tests PM::UpdateTestTableScreen before { UIView.setAnimationDuration 0.01 } it 'should update a single row in the table view' do table_screen = UpdateTestTableScreen.new table_screen.make_more_cells table_screen.update_table_data table_screen.change_cells table_screen.first_cell_title.should == "Cell 1" table_screen.second_cell_title.should == "Cell 2" table_screen.update_table_data(NSIndexPath.indexPathForRow(0, inSection:0)) table_screen.first_cell_title.should == "Cell A" table_screen.second_cell_title.should == "Cell 2" end it 'should allow multiple formats of index paths to be passed' do table_screen = UpdateTestTableScreen.new table_screen.make_more_cells table_screen.update_table_data table_screen.change_cells # Single NSIndexPath Proc.new { table_screen.update_table_data(NSIndexPath.indexPathForRow(0, inSection:0)) }.should.not.raise(StandardError) # Array of NSIndexPaths Proc.new { table_screen.update_table_data([NSIndexPath.indexPathForRow(0, inSection:0), NSIndexPath.indexPathForRow(1, inSection:0)]) }.should.not.raise(StandardError) # # Hash with single NSIndexPath Proc.new { table_screen.update_table_data({index_paths: NSIndexPath.indexPathForRow(0, inSection:0)}) }.should.not.raise(StandardError) # Hash with array of NSIndexPaths Proc.new { table_screen.update_table_data({index_paths: [NSIndexPath.indexPathForRow(0, inSection:0), NSIndexPath.indexPathForRow(1, inSection:0)]}) }.should.not.raise(StandardError) # Hash with NSIndexPath and row animation Proc.new { table_screen.update_table_data({index_paths: NSIndexPath.indexPathForRow(0, inSection:0), animation: UITableViewRowAnimationFade}) }.should.not.raise(StandardError) end end
Version data entries
20 entries across 20 versions & 1 rubygems