Today trying to run my RSpec tests and I get an odd error:
uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError)
After doing some research online I found out that the issue is caused by Shoulda and Mocha being included in my app. It seems that if you put a gem dependence for Shoulda before Mocha, you’ll get this error, so the fix is to place the gem dependence for Mocha before Shoulda.
config.gem “rspec”, :lib => false, :version => “>=1.2.6”
config.gem “rspec-rails”, :lib => ‘spec/rails’, :version => “>=1.2.6”
config.gem “thoughtbot-shoulda”, :lib => “shoulda”, :source => “http://gems.github.com”
Hope that helps
I hit the same error having shoulda in my environment.rb file, moving it to the test.rb (in environment folder) fixed the issue as well.