<commit_before>Given(/^I have a valid deed$/) do
  @deed = create_deed_hash
end

Given(/^I have a deed with two title numbers$/) do
  @deed = {
    title_number: [generate_title_number, generate_title_number]
  }
end

Given(/^I have a deed with an invalid title number$/) do
  @deed = create_deed_hash('ABCD123/EF')
end

When(/^I create a deed using Deed API$/) do
  @response = HTTP.post(Env.deed_api + '/deed/', json: @deed)
end

Then(/^a status code of "([^"]*)" is returned$/) do |code|
  assert_equal(code, @response.code.to_s)
end

Then(/^a url link to retrieve the title number is returned$/) do
  assert_match(Env.deed_api + '/deed/', @response.body)
end<commit_msg>modified issue pointed out by Phemus<commit_after>Given(/^I have a valid deed$/) do
  @deed = create_deed_hash
end

Given(/^I have a deed with two title numbers$/) do
  @deed = {
    title_number: [generate_title_number, generate_title_number]
  }
end

Given(/^I have a deed with an invalid title number$/) do
  @deed = create_deed_hash('ABCD123/EF')
end

When(/^I create a deed using Deed API$/) do
  deed_end_point = Env.deed_api + '/deed/'
  @response = HTTP.post(deed_end_point, json: @deed)
end

Then(/^a status code of "([^"]*)" is returned$/) do |code|
  assert_equal(code, @response.code.to_s)
end

Then(/^a url link to retrieve the title number is returned$/) do
  deed_end_point = Env.deed_api + '/deed/'
  assert_match(deed_end_point, @response.body)
end
{'fraction_non_alphanumeric': 0.13759555246699096, 'fraction_numerical': 0.004169562195969423, 'mean_word_length': 4.217391304347826, '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': '1560916', 'n_tokens_mistral': 552, 'n_tokens_neox': 507, 'n_words': 160}