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! While you're at it, check out some resources Treehouse students have shared here.
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
jmt
13,877 Pointsuser_friendship_test.rb - Error
I'm watching the "Testing Friendships" video and when I run ruby -Itest test/unit/user_friendship_test.rb
I get the following error and haven't been able to figure out what's going on.
c:\Treehouse\Projects\treebook> ruby -Itest test/unit/user_friendship_test.rb
test/unit/user_friendship_test.rb:4:in <class:UserFriendshipTest>': undefined m
ethodbelong_to' for UserFriendshipTest:Class (NoMethodError)
from test/unit/user_friendship_test.rb:3:in `<main>'
Here is my code...
require 'test_helper'
class UserFriendshipTest < ActiveSupport::TestCase
should belong_to(:user)
end
1 Answer
jmt
13,877 PointsRan 'bundle install' and it seems to be working now