<commit_before>require "spec_helper"

class DebugLogger
  def debug(_)
  end
end

class InfoLogger
  def info(_)
  end
end

module NmiDirectPost
  class << self
    def reset_logger
      @logger = nil
    end
  end
end

describe NmiDirectPost do
  describe "logger" do
    before(:each) do
      NmiDirectPost.reset_logger
    end

    it "should default to a STDOUT logger if Rails is not defined" do
      NmiDirectPost.logger.instance_variable_get("@logdev").instance_variable_get("@dev").should == STDOUT<commit_msg>eliminated interactions between tests<commit_after>require "spec_helper"

class DebugLogger
  def debug(_)
  end
end

class InfoLogger
  def info(_)
  end
end

module NmiDirectPost
  class << self
    def reset_logger
      @logger = nil
    end
  end
end

describe NmiDirectPost do
  describe "logger" do
    before(:each) do
      NmiDirectPost.reset_logger
    end
    after(:all) do
      NmiDirectPost.reset_logger
    end

    it "should default to a STDOUT logger if Rails is not defined" do
      NmiDirectPost.logger.instance_variable_get("@logdev").instance_variable_get("@dev").should == STDOUT
{'fraction_non_alphanumeric': 0.06927175843694494, 'fraction_numerical': 0.0, 'mean_word_length': 3.49003984063745, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5244611', 'n_tokens_mistral': 362, 'n_tokens_neox': 355, 'n_words': 106}