Skip to content

Conversation

@tylergannon
Copy link

Hi! This would be really handy for me. As you can see from the update to the readme... I use mongoid and Jose Valim's inherited_resources gem, both of sort of change the basic structure of a "plain vanilla" spec.

This "strategy" approach to the scaffold generator helps by allowing another gem to plug in a new test type. Have I missed a preferred way to accomplish this?

thanks!
Tyler

This eases changing the default workflow for the
rspec generators to allow plugging in other spec
generators.

For example ...

config.app_generators do |g|
  g.orm              :mongoid
  g.routing_specs =   :inherited_resources_routing_specs
  g.controller_specs =  :inherited_resources_controller_specs
  g.view_specs =  :inherited_resources_view_specs
end

This would kick off the new generators as
part of the normal rspec-rails generator workflow.
@dchelimsky
Copy link
Contributor

This looks good on the surface, but I'm getting errors when I merge and run the spec suite:

rspec-rails/lib/generators/rspec/controller_specs/controller_specs_generator.rb:13:in `generate_controller_spec': undefined local variable or method `controller_class_path' for #

@dchelimsky
Copy link
Contributor

Closing this as it's become stale. If you want to take another crack at it, feel free to submit a new pull against the current master.

@dchelimsky dchelimsky closed this May 15, 2012
@tylergannon
Copy link
Author

Sounds good. Thanks

On Mon, May 14, 2012 at 6:54 PM, David Chelimsky <
reply@reply.github.com

wrote:

Closing this as it's become stale. If you want to take another crack at
it, feel free to submit a new pull against the current master.


Reply to this email directly or view it on GitHub:
#268 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants