Change to minitest spec format
Support Ruby 1.9 by never defining methods directly on main

In Ruby 2, we can use #define_method on main, but it's private,
so we probably shouldn't.