spec: fix bug in ShouldThrow
Text.Lexer: use ShouldThrow in spec