Testing Models With RSpec

Testing models with RSpec is essentially one of its primary uses. After all, you do want to make sure your backend logic is working, and models are where most of that logic should go.

For more information about testing, Everyday Rails Testing With RSpec is a great source for learning more about testing Ruby with RSpec. A lot of the following was built using this as a guide.

Continue reading

BDD and Setting Up RSpec and Testing Suite

(This article assumes a rails app and database have been created and that the developer has an intermediate understanding of Rails).

Behavior-driven development (BDD) takes the position that you can turn an idea for an app or feature into product ready code that’s specific enough for both the developers and clients to understand what’s going on. There is a focus on creating tests that are written in natural language constructs, making it easier to identify what part of the website is not working.  It’s BDD that’s at the heart of using RSpec, which is a software testing tool for Ruby programmers that tests the functionality of an application.

For more on the origins of BDD see here.

The following explains how to install RSpec along with some other testing features that can be used in your Rails app.

Continue reading

Javascript and AngularJS

I’ve had this drafted for awhile but I’ve forgotten to post it so here it goes anyways … again. This one’s going to be short, due to focusing on finishing the capstone.

The final two weeks of in-class learning are here. Nothing beats learning a whole new language and framework while you’re trying to finish your capstone project, but here we go. Javascript joins HTML and CSS as being third primary language that can be read by nearly every internet browser across the world. Unlike HTML and CSS it’s a functional programming language that doesn’t just specify working in styles.

Continue reading

Creating and Reading API’s, More Git

I’ve had this drafted for awhile but I’ve forgotten to post it so here it goes anyways … again.

In the previous couple of weeks, learning how to add security features to our app was fun, and Devise actually makes a lot of these things easier, so long as we don’t try to add any customization to it afterwards. These next few weeks have been spent on learning how to call API’s and learning how to create them. We also returned to Git, something we’d covered in the first week of class.

Continue reading