Simplify state machine creation in specs

Using before_each, we can create the state machine automatically
for all specs.
Move stoplight definition into spec scope
Merge pull request #2 from theGoodEvil/refactor_spec

Refactor Spec