Adding specs to engines


#1

I am breaking an app into a bunch of rails 2.x style engine plugins.
The app is already tested with rspec and I am trying to figure out how
to get autotest or even rake spec to run the examples in the plugins.

Thanks for any information


#2

On Mon, Jun 8, 2009 at 10:33 PM, ru_ghettoremoved_email_address@domain.invalid
wrote:

I am breaking an app into a bunch of rails 2.x style engine plugins.
The app is already tested with rspec and I am trying to figure out how
to get autotest or even rake spec to run the examples in the plugins.

Thanks for any information

For plugins there is a rake spec:plugins task, but you can also roll
your own rake task pretty easily. Just take a look at all the
different spec tasks in lib/tasks/rspec.rake (generated when you ran
script/generate rspec). Also doco is here:

http://rspec.rubyforge.org/rspec/1.2.6/classes/Spec/Rake/SpecTask.html

HTH,
David


#3

Hi!

On Tue, Jun 9, 2009 at 5:33 AM, ru_ghettoremoved_email_address@domain.invalid
wrote:

I am breaking an app into a bunch of rails 2.x style engine plugins.
The app is already tested with rspec and I am trying to figure out how
to get autotest or even rake spec to run the examples in the plugins.

We use our dry_plugin_test_helper [1] to test our engines. The TODOs
at the bottom of the README are solved. So it should work with RSpec.

You should use PluginTestEnvironment.initialize_engines_environment
instead of PluginTestEnvironment.initialize_environment for engines
tests/specs.

Cheers,
Hendrik

http://github.com/imedo/dry_plugin_test_helper/tree/master


#4

On Tue, Jun 9, 2009 at 5:33 AM, ru_ghettoremoved_email_address@domain.invalid
wrote:

I am breaking an app into a bunch of rails 2.x style engine plugins.
The app is already tested with rspec and I am trying to figure out how
to get autotest or even rake spec to run the examples in the plugins.
We use our dry_plugin_test_helper [1] to test our engines. The TODOs
at the bottom of the README are solved. So it should work with RSpec.

You should use PluginTestEnvironment.initialize_engines_environment
instead of PluginTestEnvironment.initialize_environment for engines
tests/specs.

Cheers,
Hendrik

http://github.com/imedo/dry_plugin_test_helper/tree/master