spec/unit/screen_spec.rb in ProMotion-2.0.0.rc3 vs spec/unit/screen_spec.rb in ProMotion-2.0.0.rc4

- old
+ new

@@ -123,18 +123,24 @@ end describe "navigation controller behavior" do - it "should have a nav bar" do - @screen.nav_bar?.should == true + it "should let the instance set the nav_controller" do + screen = HomeScreen.new nav_bar: true, nav_controller: CustomNavigationController + screen.on_load + screen.navigationController.should.be.instance_of CustomNavigationController end it "#navigationController should return a navigation controller" do @screen.navigationController.should.be.instance_of ProMotion::NavigationController end + it "should have a nav bar" do + @screen.nav_bar?.should == true + end + it "have a right bar button item" do @screen.navigationItem.rightBarButtonItem.should.not == nil end it "should have a left bar button item" do @@ -258,6 +264,7 @@ screen.on_load screen.navigationController.toolbarHidden?.should == true screen.set_toolbar_button([{title: "Testing Toolbar"}], false) screen.navigationController.toolbarHidden?.should == false end + end