使用rails generate new_app -T
创建了一个新应用并运行rails generate rspec:install
。
$ rails generate controller Test foo bar
create app/controllers/test_controller.rb
route get "test/bar"
route get "test/foo"
invoke erb
create app/views/test
create app/views/test/foo.html.erb
create app/views/test/bar.html.erb
invoke rspec
invoke helper
create app/helpers/test_helper.rb
invoke rspec
create spec/helpers/test_helper_spec.rb
由于某种原因,invoke rspec
不会生成测试控制器规范。想法?