Nested Backbone Models

When mapping a Backbone Model directly to a REST API it is common for the resource you’re accessing to have a nested or associated resources. Backbone Models are a wrapper for a single resource, but do not attempt to implement a nested resource relationship. Backbone Collections also provide a nice mechanism to fetch multiple resources […]

Subdirectories in Cucumber Features

At some point having all of your features in a single directory maybe become an issue. Cucumber allows you to add feature subdirectories for organization. Subdirectories work as expected when running the entire cucumber suite. However, when executing a single feature located in a subdirectory cucumber doesn’t load the web_steps.rb or other support files in […]

Ruby on Rails and MySQL BIGINT

When creating a migration using Ruby on Rails and MySQL, the default MySQL type created when defining an integer field is an 11-digit signed int. This will allow you to store signed integers up to 2147483647. However MySQL has the BIGINT storage type which stores signed integers up to 9223372036854775807.

Mocking Objects with Sinon JS

We recently started writing a mobile website using JavaScript as our framework. To test the JavaScript framework we decided to try Sinon and Jasmine . With Sinon a mock is created from an instance of an object. Needing to create an instance of a class to make a mock becomes difficult for classes that have […]