spec/ios/uiviewcontroller_spec.rb in sugarcube-2.4.1 vs spec/ios/uiviewcontroller_spec.rb in sugarcube-2.4.2

- old
+ new

@@ -50,34 +50,44 @@ it 'should have `push` method' do test_controller = UIViewController.new length = @nav_controller.viewControllers.length @nav_controller.push(test_controller) - @nav_controller.viewControllers.length.should == length + 1 + wait 0.3 do + @nav_controller.viewControllers.length.should == length + 1 + end end it 'should have `<<` method' do test_controller = UIViewController.new length = @nav_controller.viewControllers.length @nav_controller << test_controller - @nav_controller.viewControllers.length.should == length + 1 + wait 0.3 do + @nav_controller.viewControllers.length.should == length + 1 + end end it 'should have `pop()` method' do length = @nav_controller.viewControllers.length @nav_controller.pop - @nav_controller.viewControllers.length.should == length - 1 + wait 0.3 do + @nav_controller.viewControllers.length.should == length - 1 + end end it 'should have `pop(:root)` method' do @nav_controller.pop :root - @nav_controller.viewControllers.length.should == 1 - @nav_controller.visibleViewController.should == @root_controller + wait 0.3 do + @nav_controller.viewControllers.length.should == 1 + @nav_controller.visibleViewController.should == @root_controller + end end it 'should have `pop(@target_controller)` method' do @nav_controller.pop @target_controller - @nav_controller.visibleViewController.should == @target_controller + wait 0.3 do + @nav_controller.visibleViewController.should == @target_controller + end end end