refactor duplication in  static_pages_spec.rb