Last Updated: February 25, 2016
·
548
· sshingler

A quick test runner

Recently, I found myself wanting to hack some ideas on a plane.

Obviously, it wasn't possible to Bundle a test framework, such as RSpec, because I didn't have an internet connection - so I managed to knock up a quick test runner:

testclass = MyTestClass.new
tests = testclass.publicmethods.grep(/test/)
tests.each {|t| puts testclass.send(t.to_sym)}

Good enough! :)