<commit_before>require 'spec_helper'

module Docxtor2
  module Rails
    describe DocxTemplateHandler do
      let(:template) { ActionView::Template.new(File.join(Known::Path::SUPPORT, 'template.docx')) }

      it 'is registered' do
        ActionView::Template.registered_template_handler(:docx).should_not be_nil
      end
      
      it 'should render template' do
        actual = subject.render(template)

        actual.should_not be_nil
        actual.size.should be > 0
      end
    end<commit_msg>simplify template handler spec<commit_after>require 'spec_helper'

module Docxtor2
  module Rails
    describe DocxTemplateHandler do
      let(:template) { ActionView::Template.new(File.join(Known::Path::SUPPORT, 'template.docx')) }
      subject { DocxTemplateHandler.new.render(template) }

      it 'is registered' do
        ActionView::Template.registered_template_handler(:docx).should_not be_nil
      end
      
      its(:size) { should be > 0 }
    end
{'fraction_non_alphanumeric': 0.09465020576131687, 'fraction_numerical': 0.00411522633744856, 'mean_word_length': 3.2863436123348015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6640393', 'n_tokens_mistral': 291, 'n_tokens_neox': 278, 'n_words': 61}