spec/unit/tables/table_screen_spec.rb in ProMotion-2.4.2 vs spec/unit/tables/table_screen_spec.rb in ProMotion-2.5.0.beta1

- old
+ new

@@ -62,65 +62,9 @@ screen.view.rowHeight.should == 77 screen.view.estimatedRowHeight.should == 77 end end - describe "search functionality" do - - before do - @screen = TableScreenSearchable.new - @screen.on_load - end - - it "should be searchable" do - @screen.class.get_searchable.should == true - end - - it "should create a search header" do - @screen.tableView.tableHeaderView.should.be.kind_of UISearchBar - end - - it "should not hide the search bar initally by default" do - @screen.tableView.contentOffset.should == CGPointMake(0,0) - end - - it "should allow hiding the search bar initally" do - class HiddenSearchScreen < TableScreenSearchable - searchable hide_initially: true - end - screen = HiddenSearchScreen.new - screen.on_load - screen.tableView.contentOffset.should == CGPointMake(0,screen.searchDisplayController.searchBar.frame.size.height) - end - - end - - describe "refresh functionality" do - - # Note this test only works if on iOS 6+ or when using CKRefreshControl. - - before do - @screen = TableScreenRefreshable.new - @screen.on_load - end - - it "should be refreshable" do - @screen.class.get_refreshable.should == true - end - - it "should create a refresh object" do - @screen.instance_variable_get("@refresh_control").should.be.kind_of UIRefreshControl - end - - it "should respond to start_refreshing and end_refreshing" do - @screen.respond_to?(:start_refreshing).should == true - @screen.respond_to?(:end_refreshing).should == true - end - - # Animations cause the refresh object to fail when tested. Test manually. - - end - describe 'test PM::TableScreen\'s method call order' do before do class MethodCallOrderTestTableScreen < PM::TableScreen def table_data; @table_data ||= []; end def on_load