I have a Rails stone that I am testing with RSpec. My gem code is in lib / my_gem, and there is a test application that Rails generates for me when I created the stone, in the test / dummy folder. I have my specifications in test / dummy / spec / models / task_spec.rb. I can fulfill these specifications with the rspec command.
Now I wanted to use Spork and Guard for testing. I ran RailsCasts http://railscasts.com/episodes/285-spork to install spork in my test / dummy application. It works, but I have 2 questions:
- How to make spork reload my lib / my_gem / * files? I tried putting paths like .. /../ lib / my_gem / ... into my Guardfile, but it doesn’t look / reload files.
- For some reason, rspec is ignoring my parameters from spec_helper, for example the line "config.filter_run: focus => true". I put them in Spork.prefork correctly. This option works when I start rspec manually using rspec spec / models / task_spec.rb, but it is ignored when I use guard / spork.
source
share