<commit_before>require File.dirname(__FILE__) + '/../../spec_helper'

describe Jobs::States do
  before(:each) do
    @job = Factory(:job)
  end

  it "should set the initial state to scheduled" do
    Job.new.state.should == Job::Scheduled
  end
  
  describe "entering a state" do
    it "should enter the specified state with parameters" do
      @job.should_receive(:enter_void).with(:foo => 'bar')
      result = @job.enter(:void, :foo => 'bar')
      result.should == @job
    end
  end
  
  describe "entering scheduled state" do
    before(:each) do
      @host = Factory(:host)<commit_msg>Tasty code coverage...<commit_after>require File.dirname(__FILE__) + '/../../spec_helper'

describe Jobs::States do
  before(:each) do
    @job = Factory(:job)
  end

  it "should set the initial state to scheduled" do
    Job.new.state.should == Job::Scheduled
    Job.new.initial_state.should == Job::Scheduled
  end
  
  describe "entering a state" do
    it "should enter the specified state with parameters" do
      @job.should_receive(:enter_void).with(:foo => 'bar')
      result = @job.enter(:void, :foo => 'bar')
      result.should == @job
    end
  end
  
  describe "entering scheduled state" do
    before(:each) do
      @host = Factory(:host)
{'fraction_non_alphanumeric': 0.1321656050955414, 'fraction_numerical': 0.0, 'mean_word_length': 3.1348684210526314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7565916', 'n_tokens_mistral': 393, 'n_tokens_neox': 383, 'n_words': 115}