Answer the question
In order to leave comments, you need to log in
Why does the test pass when it shouldn't?
In general, there is a test
require 'test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get home" do
get static_pages_home_url
assert_response :success
end
test "should get help" do
get static_pages_help_url
assert_response :success
end
test "should get about" do
get static_pages_about_url
assert_response :success
end
end
class StaticPagesController < ApplicationController
# def home
# end
# def help
# end
# def about
# end
end
Answer the question
In order to leave comments, you need to log in
cleared the browser cache, restarted the server rail... the same! What a pancake for a mystic ...
In general, I deleted all the methods from the controller file and I can still go to the pages and the test shows that everything is ok. I'm totally in shock.
rake routes gives
Prefix Verb URI Pattern Controller#Action
static_pages_home GET /static_pages/home(.:format) static_pages#home
static_pages_help GET /static_pages/help(.:format) static_pages#help
static_pages_about GET /static_pages/about(.:format) static_pages#about
root GET / application#hello
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question