Spork to Spin

In my last post, I documented the trials and tribulations of getting spork working properly with RSpec, Cucumber, SimpleCov and Mongoid, and a solution I devised to the problems. I also posted my solution to the SimpleCov issues list on GitHub. Then Christoph Olszowka, the maintainer of SimpleCov introduced me to spin, a lightweight alternative Read more about Spork to Spin[…]

When spork puts a fork in your cucumber and a spanner in your specs

TL;DR: Getting Rails, RSpec, Cucumber and SimpleCov to play nicely with spork is a pain. However, it is possible to get them all working together. Ensure config.cache_classes = true, that Rails threadsafe mode (config.threadsafe!) is not enabled, and then see my spec_helper.rb file below. So, I’m hacking again. How I have missed it. It has Read more about When spork puts a fork in your cucumber and a spanner in your specs[…]

RSpec: verifying model instance creation

UPDATE: I think this post may be a complete waste of time. Just stub out the valid? method on your model to return true or false depending upon what you’re testing. See Ryan Bates’ RailsCast on how he tests controllers. I’m a freaking idiot sometimes. As a good little rspeccer, I try hard to write Read more about RSpec: verifying model instance creation[…]