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

Ruby

No message given error in user_test

Hey guys, got a couple of errors that I'm not sure how to go about fixing, they are both the same and both deal with similar line of code:

Error: 1) Failure: test_a_user_should_have_a_profile_name_without_spaces(UserTest) [test/unit/user test.rb:40]: Failed assertion, no message given.

2) Failure: test_that_creating_friendships_on_a_user_works(UserTest) [test/unit/user_test.r :59]: Failed assertion, no message given.

Code: test "a user can have a correctly formatted profile name" do user = User.new(first_name: 'Allan', last_name: 'Evans', email: 'oneblankpage27@gmail.com') user.password = user.password_confirmation = 'trigger0'

    user.profile_name = 'allanevans_1'
--> assert user.valid?

end test "that creating friendships on a user works" do users(:allan).friends << users(:drew) users(:drew).friends.reload --> assert users(:allan).friends.include?(users(:mike)) end

Allen did you get this straighten out I,m also having the same problem can you let me know thank you

3 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Allan, sorry for the trouble! Can you zip up your code and email it to help@teamtreehouse.com?

Sure, just the files in the lesson or the entire project?

Hey Jason,

I'm getting the failure on the test "that creating friendships on a user works" with the failure message being that it's a Failed assertion and no message given. I've mailed you my zipped code.

Moreover, we have included a test in the video "that no error is raised when trying to access a friend list". But what if I want another test to make sure that a user is unable to see his friend's friend list? What should i do in that case?

Hoping for an early reply. Thanks