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! :)
Written by Steven Shingler
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#