it "throws an ArgumentError if a pattern is supplied with an invalid encoding"