<commit_before>require 'spec_helper'

describe Citrus::Web::CreateBuild do

  let(:create_build)      { described_class.new(builds_repository, build_queue) }
  let(:build_queue)       { fake(:queue) }
  let(:builds_repository) { fake(:builds_repository) }
  let(:output)            { fake(:file_output) }
  let(:changeset)         { fake(:changeset) { Citrus::Core::Changeset } }
  let(:build)             { fake(:build)     { Citrus::Core::Build     } }

  context '#call' do
    before do
      stub(builds_repository).create_build(any_args) { build  }
      stub(Citrus::Web::FileOutput).new(any_args)    { output }
      # XXX: change the line above to check in create build: some_arg.tap { |x| x.is_a?(TestOutput) }
      create_build.(changeset)
    end

    specify { expect(build_queue).to       have_received.push(build) }<commit_msg>Remove nonsense comment.<commit_after>require 'spec_helper'

describe Citrus::Web::CreateBuild do

  let(:create_build)      { described_class.new(builds_repository, build_queue) }
  let(:build_queue)       { fake(:queue) }
  let(:builds_repository) { fake(:builds_repository) }
  let(:output)            { fake(:file_output) }
  let(:changeset)         { fake(:changeset) { Citrus::Core::Changeset } }
  let(:build)             { fake(:build)     { Citrus::Core::Build     } }

  context '#call' do
    before do
      stub(builds_repository).create_build(any_args) { build  }
      stub(Citrus::Web::FileOutput).new(any_args)    { output }
      create_build.(changeset)
    end

    specify { expect(build_queue).to       have_received.push(build) }
{'fraction_non_alphanumeric': 0.1360501567398119, 'fraction_numerical': 0.0, 'mean_word_length': 3.360655737704918, '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': '3502075', 'n_tokens_mistral': 516, 'n_tokens_neox': 509, 'n_words': 83}