I'm not sure what you mean by "core code" and "the user" here. Are you
writing an app, or a library, or a plugin? If you're writing an app, you
should test the app's behavior, which includes all the plugins and however
you configured them; if you're writing a library you should have scenarios
that test the various configuration options and basic functionality.

If you're writing a Rails plugin, you should test how that plugin works
inside apps. One way to do this is to generate some toy rails apps, stick
them deep inside your "spec" directory somewhere, have them include your
plugin and configure it in various ways, then test that the toy apps perform
as expected. (Technically those would be integration tests, not unit tests,
and you don't want to write too many of them if you can test the bulk of
your code through unit tests.)

you could say "if the core tests without the plugin and the plugin tests
> with the plugin work, everything is fine", it doesn't work that well though.


If your app is using a plugin, then why (and how) would you ever test your
app without the plugin?

-- 
Alex Chaffee - a...@stinky.com
http://alexchaffee.com
http://twitter.com/alexch
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to