<commit_before>require 'spec_helper'

describe Sinatra::ContentFor do
  subject do
    Sinatra.new do
      helpers Sinatra::ContentFor
      set :views, File.expand_path("../content_for", __FILE__)
    end.new!
  end

  Tilt.prefer Tilt::ERBTemplate

  extend Forwardable
  def_delegators :subject, :content_for, :yield_content
  def render(engine, template)
    subject.send(:render, engine, template, :layout => false).gsub(/\s/, '')
  end

  describe "without templates" do
    it 'renders blocks declared with the same key you use when rendering' do
      content_for(:foo) { "foo" }
      yield_content(:foo).should == "foo"
    end
<commit_msg>Fix failing specs for ContentFor<commit_after>require 'spec_helper'

describe Sinatra::ContentFor do
  subject do
    Sinatra.new do
      helpers Sinatra::ContentFor
      set :views, File.expand_path("../content_for", __FILE__)
    end.new!
  end

  Tilt.prefer Tilt::ERBTemplate

  extend Forwardable
  def_delegators :subject, :content_for, :clear_content_for, :yield_content
  def render(engine, template)
    subject.send(:render, engine, template, :layout => false).gsub(/\s/, '')
  end

  describe "without templates" do
    it 'renders blocks declared with the same key you use when rendering' do
      content_for(:foo) { "foo" }
      yield_content(:foo).should == "foo"
    end

{'fraction_non_alphanumeric': 0.10887397464578673, 'fraction_numerical': 0.0, 'mean_word_length': 3.7588652482269502, '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': '482306', 'n_tokens_mistral': 426, 'n_tokens_neox': 414, 'n_words': 117}