app code for posts_controller_spec.rb