Tag Archives: tests

Write your own custom RSpec formatter

Earlier this year I spent some time writing a custom RSpec formatter. The purpose in my case was to be able to automatically update a remote service with the results of testing some code. You can find that project here, … Continue reading

Posted in Uncategorized | Tagged , , | 2 Comments

Test a gem with the Rails 3 stack

My previous post covers testing a gem that makes some change to how ActiveRecord works. But what if you want to test a gem that supplies some new behavior to another part of rails, like say ActionController. How do you … Continue reading

Posted in rails | Tagged , | 1 Comment

How to test a gem that changes ActiveRecord

The code given here comes from my gem, safe_attributes, which can be retrieved from https://github.com/bjones/safe_attributes. Some of the code for setting up this testing environment originally came from or was inspired by octopus, which is also available on github. The … Continue reading

Posted in rails | Tagged , , | 2 Comments