class TestNavigationController::WithChild

Public Instance Methods

setup() click to toggle source
# File test/navigation_controller_test.rb, line 71
def setup
  @subject = NavigationController.new(ViewController.new)
  @child = ViewController.new
  @subject.push_view_controller(@child)
end
test_appearing_shows_both_subject_and_child_but_not_root_view_controller() click to toggle source
# File test/navigation_controller_test.rb, line 81
def test_appearing_shows_both_subject_and_child_but_not_root_view_controller
  @subject.begin_appearance_transition(true)
  @subject.end_appearance_transition()

  assert @subject.appeared?
  assert @child.appeared?
  refute @subject.root_view_controller.appeared?
end
test_moveing_reparents_child() click to toggle source
# File test/navigation_controller_test.rb, line 90
def test_moveing_reparents_child
  target = NavigationController.new(ViewController.new)
  target.push_view_controller(@child)
  assert_equal target, @child.parent
end
test_pop_view_controller_returns_child() click to toggle source
# File test/navigation_controller_test.rb, line 77
def test_pop_view_controller_returns_child
  assert_equal @child, @subject.pop_view_controller()
end