Test::Unit support for 'rails generate model' #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings, and thank you so much for such an excellent fixture replacement gem! I especially love the tight, painless integration between machinist and Rails 3.
One of my clients uses Test::Unit, and I discovered a small limitation when install machinist.
The existing install_generator supports both Test::Unit and RSpec,
but model_generator always assumes that our blueprints live in
spec/support/blueprints.rb.
This patch adds support for Test::Unit to model_generator. Note that
there is now a small amount of code duplication between model_generator
and install_generator that should probably by factored out into a shared
module.
No unit tests are included, because I didn't see any tests for the existing generators, and I'm not quite sure how to set them up.
If you have any suggestions on rewriting this patch to either (1) include unit tests, or (2) factor out the shared generator code, please let me know. I'll be glad to make any changes you suggest.
Once again, many thanks for your excellent gem!