I’m trying to write the specs for a rails plugin.
The thing is that I don’t want to include in my specs the spec_helper
generated for the rails application as it will load the whole
stack and will force me to include all the necessary gems in my plugin
Gemfile when it is supposed to be independent of the other installed
So, I wrote my own spec_helper which loads only the required gems:
Now the problem is that when I run the rake spec task I get this error:
Failure/Error: describe FacebookController do
undefined method `env_defaults’ for nil:NilClass
This error appears only when I call the methods related to the
controller(controller, get, post, request, etc.) so I guess it has
to do with the fact that the rails application hasn’t been initialized
opossed as when the application spec_helper is loaded
Is there any way to make the specs as much as indenpendent as possible
don’t have to init the entire application?
Thanks in advance