I have been stuck on this for near 4 hours now. In the chapter we are asked to run tests for the first time. It is outputting two errors, and I don't understand what they are.
These are the errors:
Finished in 0.097197s, 20.5768 runs/s, 0.0000 assertions/s.
1) Error:
StaticPagesControllerTest#test_should_get_help:
AbstractController::Helpers::MissingHelperError: Missing helper file helpers//users/kevinmulhern/documents/the_odin_project/ruby_on_rails/sample_app/app/helpers/application_helper.rb_helper.rb
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/static_pages_controller.rb:1:in `<top (required)>'
2) Error:
StaticPagesControllerTest#test_should_get_home:
ActionView::MissingTemplate: Missing template static_pages/home, application/home with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/Users/kevinmulhern/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates"
* "/Users/kevinmulhern/documents/the_odin_project/ruby_on_rails/sample_app/app/views"
* "/Users/kevinmulhern/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0.beta3/app/views"
test/controllers/static_pages_controller_test.rb:5:in `block in <class:StaticPagesControllerTest>'
2 runs, 0 assertions, 0 failures, 2 errors, 0 skips
I ended up scraping the app as I wasnt that far through it anyway and copy and pasted my way back to the section I got stuck at, I dont think it could be a typo causing this.
heres the controller for the StaticPages
class StaticPagesController < ApplicationController
def home
end
def help
end
end
and finally here is the test file:
require 'test_helper'
class StaticPagesControllerTest < ActionController::TestCase
test "should get home" do
get :home
assert_response :success
end
test "should get help" do
get :help
assert_response :success
end
end
Any help at all would be greatly appreciated.
updated error after deleting the helpers:
1) Error:
StaticPagesControllerTest#test_should_get_home:
ActionView::MissingTemplate: Missing template static_pages/home, application/home with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/Users/kevinmulhern/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates"
* "/Users/kevinmulhern/documents/the_odin_project/ruby_on_rails/sample_app/app/views"
* "/Users/kevinmulhern/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0.beta3/app/views"
test/controllers/static_pages_controller_test.rb:5:in `block in <class:StaticPagesControllerTest>
update
I moved the project to my home directory, and that solved the problem. There must have been something wrong with my directory structure.