Even though the pattern forming in Allstate (ALL - Get Report) is different, it works for the exact same reasons as Cracker Barrel's triangle. Right now, Allstate is forming a rectangle, a consolidation pattern that's common after a stock makes a large move. Allstate's large move was the gap up that happened after its second quarter earnings call.
In short, a rectangle is just sideways price action that's bounded by a horizontal resistance level to the upside and a horizontal support level to the downside. In Allstate's case, resistance comes in at $38 and support sits at $37. Rectangles are considered "continuation patterns," because they tend to resolve in the same way that price action was headed originally. In other words, the uptrend in Allstate before the rectangle formed suggests that ALL is in store for more upside.
I'd advise against trying to be early on the Allstate trade. With shares just under $38 resistance, a breakout is likely soon to come. Declining trading volume over the course of the pattern adds some extra evidence of that.