Test Driven Development

During a recent endeavor of adding code coverage to an existing test framework I discovered that we had areas in our unit tests that were never run. This lack of evaluated code was a result of writing the unit tests after the code had been written instead of having the unit tests drive the application...

Continue reading »

Testing APIs

I recently had the opportunity to test an API and wanted to validate the results along with the structure of the response. When looking around on the internet for inspiration on how to solve this I was intrigued by the wonderful DSL created by Frisby. My goal was to not only test the security and...

Continue reading »

Adding a User Manager to your Feature Tests

In my last post I described how to write declarative step definitions. However, this means our test cases can’t assume it knows who is performing the action because the user can change at any time. We’ll need to introduce a sort of state machine to track the current user and log in as another user when needed....

Continue reading »

Writing Acceptance Tests in Third Person

When I was learning to write acceptance tests with Cucumber everything started with “I”. It made sense because you were driving a browser to click buttons and fill in forms and that’s what “you” did. However, I recently realized this doesn’t work when writing tests that require multiple users to interact with the same test....

Continue reading »

Using RFQuiltLayout with RubyMotion and RMQ

RFQuiltLayout extends UICollectionViewLayout to squeeze multiple different size boxes onto the screen. It’s the equivalent of Masonry for iOS collection view cells. The RFQuiltLayout example uses Interface Builder for most of the setup, which was a challenge to map into code. I’m going to show you everything needed to change the default collection view layout...

Continue reading »