So Rails 3.1 comes with a little-known handy "rails g plugin new" generator, which gives you a skeleton suitable for a rails gem plugin. [http://guides.rubyonrails.org/plugins.html#or-generate-a-gemified-plugin]
One of the useful things this does, is set things up conveniently for testing with Test::Unit. It gives you a basic dummy Rails app that your tests can run in the context of, to test 'engine' behavior that only functions in the copy of a Rails app. (it puts it in ./test/dummy). But your tests are still in my_gem/test , the tests dont' live in the dummy app. And my_gem/test/test_helper.rb is there, written such that tests will be run in the context of the dummy app, booted over at ../dummy/config/environment.
I describe this because I think a lot of people don't know about this new generator, which sets things up so nicely.
But my question is, has anyone figured out how to do this with rspec instead? I have tried to follow the same principles DIY to set things up like this for rspec in a rails plugin gem, but am running into various confusing roadblocks, and am hoping maybe someone else has already figured it out (or would be interested in figuring it out for the rest of us, heh).
question from:https://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec