Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Benoit Deziel
12,283 PointsTest error - Testing Friendships
After creating the first test in the Testing Friendships video, I got this error and have no idea what's happening:
? ruby -I test test/unit/user_friendship_test.rb
*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
Rack::File headers parameter replaces cache_control after Rack 1.5.
Run options:
# Running tests:
E
Finished tests in 0.083526s, 11.9723 tests/s, 0.0000 assertions/s.
1) Error:
test: UserFriendship should belong to user. (UserFriendshipTest):
NoMethodError: undefined method `failure_message' for #<Shoulda::Matchers::ActiveRecord::AssociationMatcher:0x007ffd9baaa640>
/Users/ben/.rvm/gems/ruby-1.9.3-p194/gems/shoulda-context-1.0.2/lib/shoulda/context/assertions.rb:60:in `assert_accepts'
/Users/ben/.rvm/gems/ruby-1.9.3-p194/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:332:in `block in should'
/Users/ben/.rvm/gems/ruby-1.9.3-p194/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:398:in `call'
/Users/ben/.rvm/gems/ruby-1.9.3-p194/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:398:in `block in create_test_from_should_hash'
/Users/ben/.rvm/gems/ruby-1.9.3-p194/gems/mocha-0.13.3/lib/mocha/integration/mini_test/version_230_to_2101.rb:36:in `run'
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
Thanks
1 Answer

Jason Seifer
Treehouse Guest TeacherThis is a weird one, Benoit! Can you zip up your project and email it to help@teamtreehouse.com?