<commit_before>require 'spec_helper'
describe RoundRobin do
  describe "#add" do
    it "should add a job when calling add" do
      lambda do
        RoundRobin.add(MyJob, 42)
      end.should change(RoundRobin::Job, :count).by(1)
    end

    it "should return a job" do
      job = RoundRobin.add(MyJob, 42)
      job.should be_a(RoundRobin::Job)
      job.id.should_not be_blank
    end
  end

  describe "#clear" do
    it "should remove all jobs" do
      RoundRobin::Job.create(:handler => {})<commit_msg>Check that RoundRobin.add returns an ActiveRecord object<commit_after>require 'spec_helper'
describe RoundRobin do
  describe "#add" do
    it "should return a Job that descends from ActiveRecord::Base" do
      job = RoundRobin.add(MyJob, 42)
      job.should be_a ActiveRecord::Base
    end

    it "should add a job when calling add" do
      lambda do
        RoundRobin.add(MyJob, 42)
      end.should change(RoundRobin::Job, :count).by(1)
    end

    it "should return a job" do
      job = RoundRobin.add(MyJob, 42)
      job.should be_a(RoundRobin::Job)
      job.id.should_not be_blank
    end
  end

  describe "#clear" do
    it "should remove all jobs" do
      RoundRobin::Job.create(:handler => {})
{'fraction_non_alphanumeric': 0.09714285714285714, 'fraction_numerical': 0.009795918367346938, 'mean_word_length': 2.916932907348243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6579127', 'n_tokens_mistral': 413, 'n_tokens_neox': 397, 'n_words': 123}