Spec_helper por rails plugin

Hi,
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
application
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
plugins.
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
# spec/fbrails/fbrails_spec.rb:6

This error appears only when I call the methods related to the
controller(controller, get, post, request, etc.) so I guess it has
something
to do with the fact that the rails application hasn’t been initialized
as
opossed as when the application spec_helper is loaded
Is there any way to make the specs as much as indenpendent as possible
so I
don’t have to init the entire application?
Thanks in advance

Regards

I forgot to mention that I’m using Rails 3.0.rc2 and rspec and
rspec-rails
2.0.0.beta.20

Regards

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs