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 trialArthur Miller
Courses Plus Student 7,487 PointsTest Factories Lesson
I have no idea what I broke, but after the Test Factories lesson, I get the following error:
1) Error:
test: #index when logged in should get the index page without error. (UserFriendshipsControllerTest):
ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly.
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in save!'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/attribute_methods/dirty.rb:33:in
save!'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/transactions.rb:264:in `block in save!'
35 tests, 55 assertions, 0 failures, 1 errors, 0 skips
Which is not produced in the video, any help would be truly appreciated...
1 Answer
Arthur Miller
Courses Plus Student 7,487 PointsSo, I went ahead and finished the Test Factories lesson and somehow ended up with 5 errors. Obviously I did something wrong here, but after reviewing the video about 20 times, I cannot find my errors at all so I could really use some help... I don't think copying and pasting the error report would help, as that would be a huge list, but the beginning of each error is listed below:
1) Error: test: #index when logged in should assign user_friendships. (UserFriendshipsControllerTest): ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly. /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
2) Error: test: #index when logged in should display date information on an accepted friendship. (UserFriendshipsControllerTest): ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly. /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
3) Error: test: #index when logged in should display friend's name. (UserFriendshipsControllerTest): ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly. /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
4) Error: test: #index when logged in should display pending information on pending friendship. (UserFriendshipsControllerTest): ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly. /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
5) Error: test: #index when logged in should get the index page without error. (UserFriendshipsControllerTest): ActiveRecord::RecordInvalid: Validation failed: Profile name Must be formatted correctly. /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/validations.rb:56:in `save!'
22 tests, 25 assertions, 0 failures, 5 errors, 0 skips