Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

test_a_user_can_have_a_correctly_formatted_profile_name(UserTest) [test/unit/use r_test.rb:46]:

Running tests:

F.....

Finished tests in 0.359020s, 16.7122 tests/s, 33.4243 assertions/s.

1) Failure: test_a_user_can_have_a_correctly_formatted_profile_name(UserTest) [test/unit/use r_test.rb:46]: Failed assertion, no message given.

6 tests, 12 assertions, 1 failures, 0 errors, 0 skips

8 Answers

did you ever figure that out cuz I'm getting the same thing if so can you help me with this problem thanks

Robert Ho
PLUS
Robert Ho
Courses Plus Student 11,383 Points

I'm also having this problem. Jason Seifer can you look into this? I realized I got this error after doing tests in the Creating Friendships: Working with Associations video. Thanks !

to Robert ho, change your can to should and the error should go away. at least it worked for me but I'm get a status controller failure that I need to work on. can you try this and repost it to see if it worked. code should look like this. test "a user should have a correctly formatted profile name " do

Robert Ho
PLUS
Robert Ho
Courses Plus Student 11,383 Points

i think it doesn't matter what you put in between the quotes. it's just a name for the test. for example, you can type: test "whats up everbody!" do for the name of any test and it will work as long the code for what you are testing is correct.

can you paste you code and I will check mine.

This is my code and it passed, test "a user should have a profile name without spaces" do user = User.new(first_name: ' ', last_name: ' ', email: ) user.password = user.password_confirmation = ' I just removed my personal info

C:\Users\Documents\Applications\treebook>ruby -I test test/unit/user_test.rb Run options:

Running tests:

......

Finished tests in 0.312001s, 19.2307 tests/s, 38.4614 assertions/s.

6 tests, 12 assertions, 0 failures, 0 errors, 0 skips

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey all, in the future, please paste a link to your code on GitHub or some place else so we can take a look and troubleshoot. That makes it much easier to figure out what's going on. If you aren't that far yet, you can also always drop a line to help@teamtreehouse.com.

Frankie Rosa what's in your test/fixtures/users.yml file? And in your user_test file?

I had the same error (slightly different line number). Simple fix, once you know the problem.

The problem was that you need to set the user email: address in user_test.rb to NOT MATCH the email address set in the users.yml fixture.

This was hard to figure out since Jason set the parameters of the user variable in user_test.rb to values that were very similar to the fixture.