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 trialNikhil Hira
8,081 PointsFixtures video doesn't make sense to me.
First there are 4 errors that occur because we're shown to set the password and password_confirmation in the fixture. The part of the video that removes this seems to be missing.
Secondly, why would the test for uniqueness fail? We've only created one user in this test, so their profile_name should be unique.
1 Answer
Jason Seifer
Treehouse Guest TeacherHey Nikhil Hira we fix that later on in the course. The errors come from those being virtual attributes and there are nuances between ruby, rails, and devise versions that may allow that to pass or fail.
The test for uniqueness may fail depending on whether or not you have a user fixture in the database with the same profile name. Fixtures are loaded in to the test database before each test run so there may be a conflict.