<commit_before>require 'spec_helper'

describe LiquidMarkdown::Render::Template do
  subject { described_class }

  it 'expect template string on initialize' do
    expect { subject.new }.to raise_error
  end

  context '.Markdown' do
    it 'should render h1 tag' do
      lm = subject.new('#first heading')
      expect(lm.markdown(lm.template)).to eq("<h1>first heading</h1>\n")
    end
  end

  context '.Liquidize' do
    it 'should upcase string using liquid template' do
      lm = subject.new('{{"hello world" | upcase}}')
      expect(lm.liquidize).to eq('HELLO WORLD')
    end
<commit_msg>add specific error type to make it more generic<commit_after>require 'spec_helper'

describe LiquidMarkdown::Render::Template do
  subject { described_class }

  it 'expect template string on initialize' do
    expect { subject.new }.to raise_error(ArgumentError)
  end

  context '.Markdown' do
    it 'should render h1 tag' do
      lm = subject.new('#first heading')
      expect(lm.markdown(lm.template)).to eq("<h1>first heading</h1>\n")
    end
  end

  context '.Liquidize' do
    it 'should upcase string using liquid template' do
      lm = subject.new('{{"hello world" | upcase}}')
      expect(lm.liquidize).to eq('HELLO WORLD')
    end

{'fraction_non_alphanumeric': 0.11708099438652766, 'fraction_numerical': 0.0048115477145148355, 'mean_word_length': 3.5054151624548737, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3823330', 'n_tokens_mistral': 407, 'n_tokens_neox': 382, 'n_words': 118}