berlintam/simple_exercises — pull request #1 by coreyhaines (2014-02-07 20:38:09+00:00)
Title: Add simple assert method for automated testing pleasantries!

No need for a fancy testing framework to have automated tests. The core
of everything is just a simple assert method that raises an exception if
it doesn't pass.

Even this assert method isn't the most basic. The most basis is
something like

```
def assert(condition, message="")
if !condition
raise "Failure! #{message}"
end
end
```

But, the usage of this can be a bit harsh sometimes, and you rapidly
move to having a assert(expected, actual).

Another confusing part is the age-old question of "which comes first,
'expected' or 'actual'?" I think of it this way: I assert that this (the
expected) is equal to a constant (the actual).