Ruby on Rails
Ruby on Rails
Decoupling CSS Selectors From Your Tests
For a long time, I've been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capybara). In this short article, I'm going to try Eduardo Gutierrez's suggestion of...

7 Steps To Better Cucumber Tests
When you are starting out with rails testing there are so many things you need to learn about and thus it’s very hard to have a clear picture of what goes where and what’s the best way of writing unit...

What You Need to Know When Working With External APIs in Rails
Accessing APIs seems to be pretty straight forward, until you actually do it. There are a few gotchas that I'd like to talk about to make your experience in working with external APIs a little bit mor...

The Beginner’s Guide to Rails Helpers
Helpers in Rails are used to extract complex logic out of the view so that you can organize our code better....

How to Use link_to in Rails
Even after 7 years of using Ruby on Rails I still have trouble remembering how to properly use all those options available for the link_to helper. Three out of five times I have to fire up the docs an...

3 Ways of Testing Private Methods In Rails
Here's a topic that pops up often especially when faced with the common task of testing controllers in Rails. We have some logic inside a private method and we want to test it somehow. And of course,...

How to Test Controllers in Rails
These days it seems like everyone is looking for faster tests and for good reason since loading the entire Rails framework on every test run makes the process way to slow....

How I Create a New Ruby on Rails Project
This is the process I use to create a new Ruby on Rails project. I usually use the latest stable version of Ruby/Rails and it’s companion gems....