<% if actual.element.nil? %> <% if @expected_count.nil? %> Expected <%= reconstituted(actual, @options) %> to contain <%= reconstituted(expected, @options) %> but the element did not exist. <% else %> Expected <%= reconstituted(actual, @options) %> to contain <%= reconstituted(expected, @options) %> <%= @expected_count_type.to_s.tr('_', ' ') %> <%= pluralize(@expected_count, 'time') %> but the element did not exist. <% end %> <% else %> <% if @expected_count.nil? %> Expected <%= reconstituted(actual, @options) %> to contain <%= reconstituted(expected, @options) %> but it did not. <% else %> Expected <%= reconstituted(actual, @options) %> to contain <%= reconstituted(expected, @options) %> <%= @expected_count_type.to_s.tr('_', ' ') %> <%= pluralize(@expected_count, 'time') %> but it was found <%= pluralize(@actual_count, 'time') %>. <% end %> <% end %>