2012-06-23 73 views
0

我預計這些發電機可用:找不到發電機mini_test:安裝

$ rails g 
Usage: rails generate GENERATOR [args] [options] 

MiniTest: 
    mini_test:controller 
    mini_test:helper 
    mini_test:install 
    mini_test:mailer 
    mini_test:model 
    mini_test:scaffold 

所以我跑:

$ rails g mini_test:install 

但得到這個錯誤:

Could not find generator mini_test:install. 

至於我的環境,這裏是我的相關部分Gemfile

group :test, :development do 
    gem 'minitest-rails' 
end 

,並將所得的我Gemfile.lock部分:

minitest (2.12.1) 
minitest-rails (0.0.7) 
    minitest (~> 2.12) 
    rails (~> 3.1) 

我現在在調試這個過程。我會很感激任何提示。無論如何,我會回報。

回答

0

根據minitest-rails issue #41 - Generators are not found

Try the prerelease gem, 0.1.0.alpha. Its a different approach and you'll need to update any existing tests.

我只是確認這爲我工作:

$ rails g mini_test:install 
create test 
create test/minitest_helper.rb