<commit_before>When /^I search for a widget with "([^"]*)"$/ do |query|
  @results = Widget.search do
    keywords query
  end.results
end

Then /^I should receive no results$/ do
  @results.should be_empty
end

Then /^I should receive the results$/ do |table|
  # table is a Cucumber::Ast::Table
  pending # express the regexp above with the code you wish you had
end<commit_msg>Filled out the "I should receive the results" step.<commit_after>When /^I search for a widget with "([^"]*)"$/ do |query|
  @results = Widget.search do
    keywords query
  end.results
end

Then /^I should receive no results$/ do
  @results.should be_empty
end

Then /^I should receive the results$/ do |table|
  actual = @results.map do |result|
    table.headers.inject({}) do |row, header|
      row.update(header => result.send(header))
    end
  end

  table.diff!(actual)
end
{'fraction_non_alphanumeric': 0.11962833914053426, 'fraction_numerical': 0.0, 'mean_word_length': 3.5851063829787235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3096832', 'n_tokens_mistral': 280, 'n_tokens_neox': 271, 'n_words': 106}