[rspec-users] Plugins 'speced' with rSpec?
daniel at danielfischer.com
Fri Aug 3 15:30:33 EDT 2007
I'm trying to figure out how to setup a spec structure for plugins. I'm
getting pretty lost in figuring out how to isolate a plugin enviornment
emulating rails, but not actually being reflected upon the current rails
What I mean is this, let's say I have a comment plugin. This has two things
in lib, the comment model (comment.rb) and then the module ruby file for
I'm trying to figure out how I would spec this out in the actual plugin
directory (vendor/plugins/comment_plugin/spec). What would my spec_helper
look like? How would I spec that it works? Why I'm saying this is because I
can't use any of the /app/models/ in the rails project because that is
specific to a rails project, I'm trying to isolate it into the plugin. How
would I fake a model in rspec, especially with the line that
"acts_as_comment" which sets up the polymorphic association. If anyone has
any advice, or knows of any plugins that are tested with rspec and not rails
testing, let me know.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users