1) Yes, the page shows when I start rails server, and then use the url:
http://localhost:300/static_pages/home
2) Everything in public/ was created by rails new:
$ ls public/
404.html 500.html index.html
422.html favicon.ico robots.txt
3) test.log:
Started GET "/static_pages/home" for 127.0.0.1 at 2012-08-31 10:04:28
-0700
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (3.7ms)
Completed 200 OK in 21ms (Views: 20.0ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
Started GET "/static_pages/home" for 127.0.0.1 at 2012-08-31 10:04:28
-0700
Processing by StaticPagesController#home as HTML
Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
Yet here is my controller:
class StaticPagesController < ApplicationController
end
Previously, I had actions in my controller, but I wanted to see if the
tests would fail without the actions, and I fully expected them to fail,
but they won't. I have everything at github:
https://github.com/7stud/sample_app25
Curiously, if I write a test for a non-existent view, I get three
errors: First, no route; then after I add the route:
get '/static_pages/something'
I get an error saying there's no action; then after I add the action, I
get an error saying there's no view; then after adding a view, the test
passes. Subsequently, if I delete the action for that view, the test
still passes. Why?