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

class TypusHelperTest < Test::Unit::TestCase

  include TypusHelper

  def test_header
    assert true
  end

end<commit_msg>Initial work on testing helpers.<commit_after>require File.dirname(__FILE__) + '/../test_helper'

class TypusHelperTest < Test::Unit::TestCase

  include TypusHelper

  def test_header
    output = header
    assert_match /#{Typus::Configuration.options[:app_name]}/, output
  end

  def test_typus_message
    output = typus_message('chunky bacon', 'yay')
    assert_match "<div id=\"flash\" class=\"yay\">", output
    assert_match /<p>chunky bacon<\/p>/, output
  end

  def test_typus_block
    output = typus_block(:model => 'posts', :location => 'sidebar', :partial => 'pum')
    assert output.nil?
  end

end
{'fraction_non_alphanumeric': 0.1288723667905824, 'fraction_numerical': 0.0, 'mean_word_length': 4.146496815286624, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, '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': '1191373', 'n_tokens_mistral': 261, 'n_tokens_neox': 254, 'n_words': 62}