* You are viewing the archive for October, 2009

uninitialized constant Test::Unit::TestResult::TestResultFailureSupport Error

Today trying to run my RSpec tests and I get an odd error:
uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError)
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in `const_missing’
/usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.3/lib/test/unit/testresult.rb:28
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require’
….
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 “mocha”
config.gem “thoughtbot-shoulda”, :lib => “shoulda”, :source => “http://gems.github.com”
Hope that helps

UPDATE:

I hit the same error having … Continue Reading

Error with fsevent and autospec (on Mac)

Today I’ve upgraded my gems and noticed that when running my autospec I get an odd error:
[01:09:25 /usr/local/lib/ruby/gems/1.8/gems/ruby-ole-1.2.10/lib/ole/storage/base.rb:146:load]

WARN   root name was “R”
And my autospec would keep printing out:

sh: line 1:  6303 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep ‘/Users/andrew/rails_apps/example_com’ 2>&1
sh: line 1:  6307 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep ‘/Users/andrew/rails_apps/example_com’ 2>&1
Unfortunately I don’t have the time to look into the fsevent code to see if I can make a work around, however I found that you can remove the gem (’sudo gem uninstall autotest-fsevent’) and install the older version (’sudo gem install autotest-fsevent –version 0.1.1′)

Hopefully this helps someone … Continue Reading