How to add a rake test to a project

When I started rake -T, I found that it was rake testmissing. What do I need to do to complete this task? In particular, I want to run rake test:benchmark, but it does not seem to load. For instance...

$rake test:benchmark

rake aborted!
Don't know how to build task 'test:benchmark'
+5
source share
2 answers

config/application.rbThis line was missing in my file :

require 'rails/all'
+9
source

You only need:

require "rails/test_unit/railtie"

at config/application.rb

+3
source

All Articles