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 trialfredrikliden
8,720 PointsTesting and DB
Are the steps and courses created in the tests persisted in the DB?
2 Answers
Iain Simmons
Treehouse Moderator 32,305 PointsWhen I run the tests I see the following:
Creating test database for alias 'default'...
.....
----------------------------------------------------------------------
Ran 5 tests in 0.062s
OK
Destroying test database for alias 'default'...
Which I assume means another database is created and then destroyed each time you run the tests, and leaves the database used by the app/project alone.
Kenneth Love
Treehouse Guest TeacherIn the code challenges or in the course itself?
fredrikliden
8,720 PointsFor the code challenge but also in general. Looks like the test is adding new objects. Are those just in memory? or is it a separate test db? So it's not polluting the production DB for example. I'm probably missing something.
Kenneth Love
Treehouse Guest TeacherYour course db is persistent because your Workspace is.
The database is thrown away at the end of each code challenge, though.
Kenneth Love
Treehouse Guest TeacherKenneth Love
Treehouse Guest TeacherCorrect.