spec/screen_spec.rb in ProMotion-0.6.2 vs spec/screen_spec.rb in ProMotion-0.6.3

- old
+ new

@@ -95,9 +95,24 @@ end end + describe "pm_main_controller" do + + it "should return the navigation controller wrapper" do + @screen.pm_main_controller.should.be.instance_of ProMotion::NavigationController + end + + it "should return itself when screen is a plain UIViewController" do + vc = UIViewController.alloc.initWithNibName(nil, bundle: nil) + vc.respond_to?(:pm_main_controller).should == true + vc.pm_main_controller.should == vc + end + + end + + describe "navigation controller behavior" do it "should have a nav bar" do @screen.has_nav_bar?.should == true end