Passing unit tests

:smile:
Again, this code should be reused (see https://github.com/apiaryio/snowcrash/pull/143/files#diff-c6888a61478dcf887739cd37b3b8c45aR121)