compact rspec with shared examples