<%= content_tag_for(:article, item) do %>
  <div class="text">
    <h2><%= link_to item.title, public_document_path(item), class: "title" %></h2>
    <% if display != "compact" %>
      <p class="summary">
        <%= item.summary %>
      </p>
    <% end %>
    <div class="meta">
      <span class="type"><%= announcement_type(item) %></span>
      <span class="published_at">posted <%= relative_time(item.first_published_at, class: 'first_published_at') %></span>
      <% if item.organisations.any? %>
        <span class="organisations">by <% item.organisations.each do |org| %>
            <%= link_to (org.acronym.blank? ? org.name : org.acronym), organisation_path(org) %>
        <% end %></span>
      <% end %>
    </div>
  </div>
<% end %>

<%= content_tag_for(:article, item) do %>
  <div class="text">
    <h2><%= link_to item.title, public_document_path(item), class: "title" %></h2>
    <p class="summary">
      <%= item.summary %>
    </p>
    <div class="meta">
      <span class="type"><%= announcement_type(item) %></span>
      <span class="published_at">posted <%= relative_time(item.first_published_at, class: 'first_published_at') %></span>
      <% if item.organisations.any? %>
        <span class="organisations">by <% item.organisations.each do |org| %>
            <%= link_to (org.acronym.blank? ? org.name : org.acronym), organisation_path(org) %>
        <% end %></span>
      <% end %>
    </div>
  </div>
<% end %>

Stop random cruft being printed during tests
Stop random cruft being printed during tests

It turns out that #display is actually a method on Object which dumps
information about an object. If the display variable hadn't been passed
in to this template then it was causing output like
  #<#<Class:0x007f97c0c9dfd8>:0x007f97c2210fa0>
to be printed during test runs.
