We create rails 3.2.9 engine with the command below:
rails plugin new my_eng --mountable --dummy-path=spec/dummy
in my_eng.gemspec, rspec was added:
s.add_development_dependency "rspec-rails", ">= 2.0.0"
Run bundle install
. Then in engine's root directory:
rails g rspec:install
A spec_helper.rb file is created under spec/.
The problem is that when a model or controller is created,ex, rails g model my_model...
, under spec/, there is no models directory and my_model_spec.rb were created. We tried to run rails g rspec:install
under spec/dummy/ and the problem remains. What's wrong with our code? Thanks for the help.