RSpec: Refactored request validation into shared examples.