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:
- How to make spork reload my lib/my_gem/* files? I tried putting paths like ../../lib/my_gem/... in my Guardfile, but it does not watch/reload the files.
- For some reason, rspec is ignoring my options from spec_helper, for example the "config.filter_run :focus => true" line. I did properly put these into Spork.prefork. This setting is working when I run rspec manually with rspec spec/models/task_spec.rb, but it is being ignored when I use guard/spork.