A well-written test case tells a clear story, communicating the intent of code. Learn how to write expressive tests and why duplication isn't always a bad thing in your test cases.
I realise it’s not the core lesson, but it’s little strange that the specs explicitly mention the after_save callback – this seems like testing implementation rather than behaviour?
Also, I’m curious why the Invitation factory defaults to nil for user and team? Shouldn’t instantiating it return a valid instance? (it would fail FactoryGirl.lint in its current form).
Why would doing
membership_to_promote = build_non_admin_membership
be preferable to something like
let(:non_admin_membership) { Membership.new(admin: false) }?