Ticket #588 (closed enhancement: fixed)

Opened 9 months ago

Last modified 7 months ago

[PATCH] Generate extensions with RSpec support by default, or optionally with Test::Unit

Reported by: AndrewO Assigned to:
Priority: major Milestone: 0.6.5-Chisel
Component: extension system Keywords: rspec extension
Cc:

Description

This patch adds support for a "--with-rspec" argument to the extension generator. Running script/generate extension Foo --with-rspec will cause the extension to have a spec directory, spec_helper.rb, Rakefile with RSpec tasks, etc.

extension_model and extension_controller will likewise check to see if the extension is using RSpec and generate the correct test code.

This patch also includes fixes to script/spec and environments/test.rb that were necessary to get RSpec running in the first place.

Attachments

rspec_extensions.diff (21.9 kB) - added by AndrewO on 12/03/07 13:29:13.
Uses RSpec by default now. Specify --with-test-unit for Test::Unit

Change History

11/29/07 13:32:05 changed by seancribbs

Test environment load path was patched in r624.

12/03/07 13:29:13 changed by AndrewO

  • attachment rspec_extensions.diff added.

Uses RSpec by default now. Specify --with-test-unit for Test::Unit

12/03/07 13:31:14 changed by AndrewO

  • summary changed from [PATCH] Optionally generate extensions with RSpec support to [PATCH] Generate extensions with RSpec support by default, or optionally with Test::Unit.

The new patch uses RSpec by default. Extension creators can still use Test::Unite by specifying --with-test-unit.

12/11/07 12:42:00 changed by AndrewO

Please also commit the patch #593 with this patch. Otherwise script/spec will likely not work in instances.

02/18/08 23:05:10 changed by seancribbs

  • status changed from new to closed.
  • resolution set to fixed.

Addressed in [746].