• azul's avatar
    test: flatten assertion blocks for error responses · bcef262d
    azul authored
    We used to raise exceptions in the controllers
    and then handle them with exception apps.
    This was best tested with blocks of the form
      assert_not_found do
        get :show, id: :nonexisting
    Since we handle the error cases directly now
    we can test for the response code instead.
    This allows a simpler style of assertions:
      get :show, id: :nonexisting
    This is more chronological, less lines and easier to understand.
home_controller_test.rb 1.27 KB