I have a Rails gem that I am testing with RSpec. My gem's code is in lib/my_gem, and there is a test application that Rails generated for me when I created the gem, in the folder test/dummy. I have my specs in test/dummy/spec/models/task_spec.rb. I can run these specs fine with the rspec command.
Now I wanted to use Spork and Guard for my testing. I followed RailsCasts http://railscasts.com/episodes/285-spork to install spork in my test/dummy app. It does work but I have 2 issues:
I finally was able to solve the problem. The key is running the tests from the root directory and not from test/dummy. You can see my setup if you clone my gem https://github.com/mrbrdo/has_moderated I think the key was in the Guardfile (note the paths to test/dummy), Rakefile (the spec task) and in both spec_helper.rb files (one in spec/ and one in test/dummy/spec). Feel free to comment if you find something else was required.