Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
First let me say up front that this library is an experiment. I don’t even know if it is a good idea yet but if you are feeling adventurous I encourage you to take the red pill and see how deep this rabbit hole goes.
So the basic goal of this library is to allow you put your test right next to the code being tested. For example:
def multiply(a, b) a * b end Test do assert_equal 6, multiply(2, 3) assert_equal 10, multiply(5, 10) assert_not_equal 42, multiply(6, 9) end
Lets go over a few of the key features of in-line testing.
To understand what you are getting into see Trade-offs. In addition we have Rails Integration. If you want to know why I use CamelCase see Test block API. Also in case you are curious test_inline should not really affect the Performance of an app.