Hartl Rail Tutorial: Chapter 5, exercise 3

一世执手 提交于 2019-12-06 06:16:37

I think you miss nothing
because from what I get in http://guides.rubyonrails.org/testing.html section 6
rake test:integration just Runs all the integration tests from test/integration

application_helper_test.rb is different test from the integration test
application_helper_test.rb is just for testing the full title helper method

As far as I understand it: Integration tests "simulate the actions of a user interacting with our application using a web browser". This exercise is not an integration test, it tests something that has nothing to do with users interacting, so I suppose that is why it is not called in a rake test:integration. Furthermore, if you compare this file with the test/controllers/static_pages_controller_test.rb you will see that they inherit from different classes: the application helper test from ActionView and the static_pages-controller_test from ActionController. But... I am a Ruby Nuby, so let's see if someone can confirm this?

If you saved the test file under test/helpers, then use:

    rails test:helpers

This will run all tests in that directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!