<commit_before>require 'spec_helper'

describe Coldshoulder::Generator do

  it 'has a way to get a URL' do
    Coldshoulder::Generator.new.request_url('http://www.google.com').response_code.should == 200
  end

  it 'sets the target language' do
    c = Coldshoulder::Generator.new('Ruby')
    c.target_language.should == 'Ruby'
  end

  it 'generates a gitignore file' do
    file = mock('file')
    File.should_receive(:open).with(".gitignore", "w").and_yield(file)
    file.should_receive(:write)
    Coldshoulder::Generator.new('Ruby').generate
  end

end<commit_msg>Added another test to verify no files are created when a bad language is provided.<commit_after>require 'spec_helper'

describe Coldshoulder::Generator do

  it 'has a way to get a URL' do
    Coldshoulder::Generator.new.request_url('http://www.google.com').response_code.should == 200
  end

  it 'sets the target language' do
    c = Coldshoulder::Generator.new('Ruby')
    c.target_language.should == 'Ruby'
  end

  it 'generates a gitignore file' do
    file = mock('file')
    File.should_receive(:open).with(".gitignore", "w").and_yield(file)
    file.should_receive(:write)
    Coldshoulder::Generator.new('Ruby').generate
  end

  it 'does not generate a gitignore file when a bad language is provided' do
    file = mock('file')
    File.should_not_receive(:open)
    Coldshoulder::Generator.new('PythonRubySharp').generate
  end

end
{'fraction_non_alphanumeric': 0.1228813559322034, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 4.209558823529412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1167524', 'n_tokens_mistral': 472, 'n_tokens_neox': 433, 'n_words': 116}