Write your thoughts about the "shared examples" best practice.
Doesn't this violate the one assertion per test principal? ;) FWIW, I agree with this practices, but just goes to show that the other rule is more of a guideline.
I don't believe it violates the 'one assertion rule' by definition. It will depend entirely on how you define your shared example. The intent is to group behavior, so it can include multiple single assertion cases. See https://www.relishapp.com/rspec/rspec-core/v/2-11/docs/example-groups/shared-examples for examples of this.
The GOOD example is missing the actual shared examples, so this code doesn't make sense unless someone knows how shared examples work.
@gavingmiller absolutely right. Shared examples definition part is missing. It is confusing.