<commit_before>require_relative 'test_helper'

class HTMLRendererTest < Minitest::Test
  def setup
    @template = File.expand_path('helper_files/simple.html.erb', File.dirname(__FILE__))
  end

  def test_render_returns_string
    binding_klass = Minitest::Mock.new
    binding_klass.expect :get_binding, binding_klass.send(:binding)
    binding_klass.expect :today, Time.now.to_s
    binding_klass.expect :last_updated, Time.now.to_s

    renderer = Mako::HTMLRenderer.new(template: @template, binding: binding_klass)
    rendered = renderer.render
    assert_instance_of String, rendered

    binding_klass.verify
  end
end<commit_msg>Change arg from binding to bound<commit_after>require_relative 'test_helper'

class HTMLRendererTest < Minitest::Test
  def setup
    @template = File.expand_path('helper_files/simple.html.erb', File.dirname(__FILE__))
  end

  def test_render_returns_string
    binding_klass = Minitest::Mock.new
    binding_klass.expect :get_binding, binding_klass.send(:binding)
    binding_klass.expect :today, Time.now.to_s
    binding_klass.expect :last_updated, Time.now.to_s

    renderer = Mako::HTMLRenderer.new(template: @template, bound: binding_klass)
    rendered = renderer.render
    assert_instance_of String, rendered

    binding_klass.verify
  end
end
{'fraction_non_alphanumeric': 0.08816705336426914, 'fraction_numerical': 0.0, 'mean_word_length': 4.935779816513762, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6929760', 'n_tokens_mistral': 408, 'n_tokens_neox': 413, 'n_words': 78}