<commit_before>require "spec_helper"
require "radiant/task_support"

describe Radiant::TaskSupport do
  describe "self.config_export" do
    before do
      @yaml_file = "#{Rails.root}/tmp/config/radiant_config.yml"
      FileUtils.rm_rf(File.dirname(@yaml_file))
      Radiant::Config['test_data'] = 'test string'
      File.exist?(@yaml_file).should be_false
    end
    it "should create a YAML file in config/radiant_config.yml" do
      described_class.config_export(@yaml_file)
      File.exist?(@yaml_file).should be_true
    end
    it "should create YAML equal to Radiant::Config.to_hash" do<commit_msg>Cleared deprecations for be_true/be true and be_false/be false<commit_after>require "spec_helper"
require "radiant/task_support"

describe Radiant::TaskSupport do
  describe "self.config_export" do
    before do
      @yaml_file = "#{Rails.root}/tmp/config/radiant_config.yml"
      FileUtils.rm_rf(File.dirname(@yaml_file))
      Radiant::Config['test_data'] = 'test string'
      File.exist?(@yaml_file).should be false
    end
    it "should create a YAML file in config/radiant_config.yml" do
      described_class.config_export(@yaml_file)
      File.exist?(@yaml_file).should be true
    end
    it "should create YAML equal to Radiant::Config.to_hash" do
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0, 'mean_word_length': 4.096, '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': '1529091', 'n_tokens_mistral': 422, 'n_tokens_neox': 409, 'n_words': 92}