<commit_before>Given 'lockfile' do |content|
  create_file expand('$tmp').to_lockfile_path, expand(content)
end

Given /^I delete lockfile$/ do
  delete_path expand('$tmp').to_lockfile_path
end

Then 'I get lockfile' do |content|
  # For some reason, Cucumber drops the last newline from every docstring...
  File.open(expand('$tmp').to_lockfile_path, 'r').read().should ==
    (content == '' ? '' : expand(content) + "\n")
end
<commit_msg>Rewrite a step to verify a lockfile content<commit_after>Given 'lockfile' do |content|
  create_file expand('$tmp').to_lockfile_path, expand(content)
end

Given /^I delete lockfile$/ do
  delete_path expand('$tmp').to_lockfile_path
end

Then 'a lockfile is created with:' do |content|
  # For some reason, Cucumber drops the last newline from every docstring...
  steps %Q{
    Then the file "#{'.'.to_lockfile_path}" should contain exactly:
      """
      #{content == '' ? '' : expand(content) + "\n"}
      """
  }
end

{'fraction_non_alphanumeric': 0.14641744548286603, 'fraction_numerical': 0.0, 'mean_word_length': 4.26775956284153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '359115', 'n_tokens_mistral': 323, 'n_tokens_neox': 315, 'n_words': 94}