Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (20 sloc) 628 Bytes

Defining a Test Case

Any object in a test suite that responds to #each, will be iterated over and each entry run a test or another sub-case. For instance, given an abitrary object defined as follows.

test =

def test.okay

  @okay = true

And placed into an array.

tests = [test]

If we pass this to a test runner as part of a test suite,

runner =>[tests], :format=>'test')

success =

We will see that the test was called.


And testing was successful.

success.assert == true