Sha256: 525501d5aa881f7b427ef482e49ab0c80ac3b052a5f1d019e93d6b5f45af48e0
Contents?: true
Size: 1.74 KB
Versions: 1
Compression:
Stored size: 1.74 KB
Contents
describe "split screen in tab bar functionality" do before do @app = TestDelegate.new @master_screen = HomeScreen.new nav_bar: true @detail_screen = BasicScreen.new nav_bar: true @split_screen = @app.create_split_screen @master_screen, @detail_screen @tab = @app.open_tab_bar @split_screen, HomeScreen, BasicScreen end after do @split_screen.delegate = nil # dereference to avoid memory issue end it "should create a UISplitViewController" do @split_screen.is_a?(UISplitViewController).should == true end it "should have two viewControllers" do @split_screen.viewControllers.length.should == 2 end it "should set the root view to the tab bar" do @app.window.rootViewController.should == @tab end it "should return screens for the master_screen and detail_screen methods" do @split_screen.master_screen.is_a?(PM::Screen).should == true @split_screen.detail_screen.is_a?(PM::Screen).should == true end it "should return navigationControllers" do @split_screen.viewControllers.first.is_a?(UINavigationController).should == true @split_screen.viewControllers.last.is_a?(UINavigationController).should == true end it "should set the first viewController to HomeScreen's main controller" do @split_screen.master_screen.should == @master_screen @split_screen.viewControllers.first.should == @master_screen.main_controller end it "should set the second viewController to BasicScreen's main controller" do @split_screen.detail_screen.should == @detail_screen @split_screen.viewControllers.last.should == @detail_screen.main_controller end it "should set the tab bar first viewController to the split screen" do @tab.viewControllers.first.should == @split_screen end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ProMotion-0.6.1 | spec/split_screen_in_tab_bar_spec.rb |