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 User Authentication with Rails Password Hashing and Sign In Integration testing authentication

Terribly confused by the tests toward the end of the Integration testing authentication video

There is probably something stupid that I'm not noticing going on here, but here goes...

Even though there are two examples being run in the second part of the video, only one shows up when it is run in the video. What is going on here? Am I seeing things?

1 Answer

David Moore
David Moore
13,916 Points

I cannot know for sure which time you are referring to but many times around the end of the video Jason is running the specific test, not the whole file. To do this, you would issue the following command in your terminal:

rspec spec/features/users/authentication_spec.rb:4

This runs the test specifically on line 4 of the file. You can use the :line notation to gain access to the most granular level of testing. You would usually do this for speed over running the entire file or if you have other tests you know are failing and want to avoid a wall of red spam while you work on one specific issue.

Hope this helps!