Rspec: testing nested controllers
I have a nested controller that works fine, and I'd like to setup rspec to also test a nested controlled, but it doesn't test the controller unless I specify it.
i.e. my rspec test controller is here: /spec/controllers/organizations/memberships_controller.rb
but when I run rspec to test everything, it tests everything except the nested controller:
bundle exec rspec spec
to test the nested controlled, I have to specifically ask rspec to test it:
bundle exec rspec spec/controllers/organizations/memberships_controller.rb
Is ther开发者_开发知识库e anyway to make rspec test the nested controlled automatically?
Thanks.
Sean
It's not picking it up because it doesn't end in _spec.rb
Rename it to spec/controllers/organizations/memberships_controller_spec.rb
精彩评论