Test items are not in the rake: rake aborted! I don’t know how to build the test: units task

I recently created a Rails 4 application, and for some reason my rake tasks do not include test. Here are some console steps to demonstrate the problem:

> rake test:units
    rake aborted!
    Don't know how to build task 'test:units'
    /Users/clozach/.rvm/gems/ruby-2.1.3@hoverfly/bin/ruby_executable_hooks:15:in `eval'
    /Users/clozach/.rvm/gems/ruby-2.1.3@hoverfly/bin/ruby_executable_hooks:15:in `<main>'
    (See full trace by running task with --trace)

fine.: (

> rake test
>

There is no conclusion.: (

> rake -T --all | grep test
    rake db:test:clone                      # 
    rake db:test:clone_schema               # 
    rake db:test:clone_structure            # 
    rake db:test:deprecated                 # 
    rake db:test:load                       # 
    rake db:test:load_schema                # 
    rake db:test:load_structure             # 
    rake db:test:prepare                    # 
    rake db:test:purge                      # 
    rake log:clear                          # Truncates all *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)
    rake tmp/cache/assets/test              # 

No testtasks at all !: '(

Any idea why this is so, and what can I do to fix it?

+4
source share
1 answer

Take a look at config/application.rbwhether the testing framework is really needed there. At the top should be

require "rails/all"

, . , test_unit.

require "rails/test_unit/railtie" 
+10

All Articles