<commit_before>require 'mspec/mocks/proxy'

class Object
  def stub!(sym)
    Mock.install_method self, sym, :stub
  end

  def should_receive(sym)
    Mock.install_method self, sym
  end

  def should_not_receive(sym)
    proxy = Mock.install_method self, sym
    proxy.exactly(0).times
    # return nil so that further chained calls will raise
    nil
  end

  def mock(name, options={})
    MockObject.new name, options
  end
end<commit_msg>Object#should_not_receive should not return nil so we can chain calls to it.<commit_after>require 'mspec/mocks/proxy'

class Object
  def stub!(sym)
    Mock.install_method self, sym, :stub
  end

  def should_receive(sym)
    Mock.install_method self, sym
  end

  def should_not_receive(sym)
    proxy = Mock.install_method self, sym
    proxy.exactly(0).times
  end

  def mock(name, options={})
    MockObject.new name, options
  end
end
{'fraction_non_alphanumeric': 0.08248587570621468, 'fraction_numerical': 0.0022598870056497176, 'mean_word_length': 3.5670103092783507, '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': '5363456', 'n_tokens_mistral': 299, 'n_tokens_neox': 289, 'n_words': 86}