<commit_before>RSpec::Matchers.define :optionally_be do |expected|
  match do |actual|
    actual.nil? || actual.is_a?(expected)
  end

  failure_message_for_should do |actual|<commit_msg>Update to Rspec 3 syntax for optional matcher<commit_after>RSpec::Matchers.define :optionally_be do |expected|
  match do |actual|
    actual.nil? || actual.is_a?(expected)
  end

  failure_message do |actual|
{'fraction_non_alphanumeric': 0.10579345088161209, 'fraction_numerical': 0.0025188916876574307, 'mean_word_length': 5.419354838709677, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7193275', 'n_tokens_mistral': 133, 'n_tokens_neox': 130, 'n_words': 32}