Ruby is nice. Tests aren’t.

Christine Tran
Aug 23, 2017 · 2 min read

Ruby is truly my new friend. It’s super easy to understand and write. It gave me a better understanding of the basics of Javascript from the prep courses. What’s funny is that I think my 8th grade computer science class may have worked with a language similar to Ruby.

I enjoy the videos included within some of the Ruby lessons. They weren’t long and very easy to follow along with the lesson itself. Sometimes you just need a lot more visuals and a live action view of how codes are written and executed to understand how things work.

What I have difficulty most so far with Introduction to Ruby was learning how to read tests from spec files to pass a variety of labs. In terms of reading and executing tests,are we supposed to execute the tests by how the order of the tests are written from the spec file?

I reached out for help in the “Ask A Question” field about this and got a great response, even though I had a hard time comprehending it at first. Here’s a recap of what I’ve learned.

We shouldn’t worry about what the program does. Codes are read from top to bottom, left to right. The spec file is for the developer who has expectations in which they expect the code to behave the way they intended. Our goal for these labs is to test these codes to get them to pass. The way or convention in which the spec file is written doesn’t have to be followed explicitly. However, the more dry and concise and clear the program reads, the better.

Tests are something I have to start learning more of. In the next post, I’ll be diving into the first big lab project of building a Tic Tac Toe game.


Originally published at christineiscoding.com on August 23, 2017.

)
Christine Tran

Written by

Full-Stack Developer and UX Designer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade