I worked on a rails project recently that had a peculiar problem. When running the specs via
rake spec or
rspec the whole suite would run twice. I began digging around in
spec/spec_helper.rb to try to figure out how RSpec could be configured to run twice instead of once. I also went to google and stack overflow and didn't find much.
Eventually I saw that there was both a
.rspec file with configuration options and a few of the same configuration options repeated in the spec_helper. Once I removed the duplication (in particular the format documentation option was specified in both places), the RSpec suite only ran once.
The easiest way to avoid this kind of problem is to decide on a project level to keep RSpec options in
.rspec, but not both.