class TestNavigationController::WithChildrenAndAppeared

Public Instance Methods

setup() click to toggle source
# File test/navigation_controller_test.rb, line 133
def setup
  @subject = NavigationController.new(ViewController.new)
  @children = [ViewController.new, ViewController.new, ViewController.new]
  @children.each { |child| @subject.push_view_controller(child) }
  @subject.begin_appearance_transition(true)
  @subject.end_appearance_transition()
end
test_move_top_view_controller_to_hidden_parent_hides_it() click to toggle source
# File test/navigation_controller_test.rb, line 151
def test_move_top_view_controller_to_hidden_parent_hides_it
  child = @subject.top_view_controller
  target = NavigationController.new(ViewController.new)
  target.push_view_controller(child)
  assert child.disappeared?
end
test_pop_to_root_hides_last_child() click to toggle source
# File test/navigation_controller_test.rb, line 141
def test_pop_to_root_hides_last_child
  @subject.pop_to_root_view_controller()
  assert @children.last.disappeared?
end
test_pop_to_root_shows_root_view_controller() click to toggle source
# File test/navigation_controller_test.rb, line 146
def test_pop_to_root_shows_root_view_controller
  @subject.pop_to_root_view_controller()
  assert @subject.root_view_controller.appeared?
end