Forum: RSpec Adding specs to engines

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7fbea09639356f0438b7be8823669825?d=identicon&s=25 ru_ghetto (Guest)
on 2009-06-09 06:35
(Received via mailing list)
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
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-06-09 06:42
(Received via mailing list)
On Mon, Jun 8, 2009 at 10:33 PM, ru_ghetto<ru_ghetto@rubyghetto.com>
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/Spe...

HTH,
David
Fdf257f4e6ccd80614b86f88cc55d469?d=identicon&s=25 Hendrik Volkmer (Guest)
on 2009-06-09 22:47
(Received via mailing list)
Hi!

On Tue, Jun 9, 2009 at 5:33 AM, ru_ghetto<ru_ghetto@rubyghetto.com>
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
0bb6a8fed149dc600151058af92265d0?d=identicon&s=25 Hendrik Volkmer (hvolkmer)
on 2009-06-10 20:00
(Received via mailing list)
On Tue, Jun 9, 2009 at 5:33 AM, ru_ghetto<ru_ghetto@rubyghetto.com>
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
This topic is locked and can not be replied to.