Riot is a fast, expressive, and contextual ruby unit testing framework
Riot - Ruby Testing Framework an extremely fast-running, expressive, and context-driven unit testing framework. protest the slow test.
I'm using Riot (https://github.com/thumblemonks/riot) for testing though we could use something else.
I get test output like this:
> ruby my_test_file.rb
Running a test
+ something works
+ something else works
- something failed
I'd like to programmatically access this information. Something like:
test = TestClass.load("my_test_file.rb")
result = test.run
result.errors # some array
Source: (StackOverflow)