spec/unit/tables/table_screen_spec.rb in ProMotion-2.0.1 vs spec/unit/tables/table_screen_spec.rb in ProMotion-2.1.0.beta1
- old
+ new
@@ -110,23 +110,9 @@
proc { @screen = MethodCallOrderTestTableScreen.new }.should.not.raise(NoMethodError)
end
end
describe "test PM::TableScreen's updating functionality" do
- before do
- class UpdateTestTableScreen < PM::TableScreen
- def table_data; @table_data ||= []; end
- def on_load
- @table_data = [{cells: []}]
- update_table_data
- end
-
- def make_more_cells
- @table_data = [{cells: [{title: "Cell 1"},{title: "Cell 2"}]}]
- end
- end
- end
-
it 'should update the table data when update_table_data is called' do
@screen = UpdateTestTableScreen.new
@screen.tableView(@screen.tableView, numberOfRowsInSection:0).should == 0
@screen.make_more_cells