<commit_before>require_relative '../../test_helper'

describe Presentator::App do

  describe "With no slides set" do
    before do
      @app = Presentator::App.new do
      end
    end

    it "should not be able to run" do
      present = -> { @app.present! }
      present.must_raise Presentator::NoContentError
    end
  end

  describe "With an added slide" do
    before do
      @app = Presentator::App.new do
        slide do
          text "Hello, world"
        end
        slide do
          list do
            text 'test'
            text 'test'
          end
        end
      end
    end

    let (:slides) { @app.slides }

    it "must have slides with some content" do
      slides.wont_be_empty
    end

    it 'has a slide that contains only text' do
      slides.first.elements.count.must_equal 1
      slides.first.elements.first.class.must_equal Elements::Text
    end

    it 'has a slide that contains a list' do
      slides[1].elements.count.must_equal 1
    end
  end

end
<commit_msg>:interrobang: A couple more small samples<commit_after>require_relative '../../test_helper'

describe Presentator::App do

  describe "With no slides set" do
    before do
      @app = Presentator::App.new do
      end
    end

    it "should not be able to run" do
      present = -> { @app.present! }
      present.must_raise Presentator::NoContentError
    end
  end

  describe "With an added slide" do
    before do
      @app = Presentator::App.new do
        slide do
          text "Hello, world"
        end
        slide do
          list do
            text 'test'
            text 'test'
          end
        end
      end
    end

    let (:slides) { @app.slides }

    it "must have slides with some content" do
      slides.wont_be_empty
    end

    it 'has a slide that contains only text' do
      slides.first.elements.count.must_equal 1
    end

    it 'has a slide that contains a list' do
      slides[1].elements.count.must_equal 1
    end

    it 'has a slide that contains a list that contains text' do
      # YO DAWG
      slides[1].elements.first.elements.count.must_equal 2
    end

    it 'correctly computes the height of the elements' do
      slides[1].height.must_equal 2
    end
  end

end

{'fraction_non_alphanumeric': 0.07369361322018758, 'fraction_numerical': 0.0044662795891022775, 'mean_word_length': 1.9242819843342036, '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': '4418897', 'n_tokens_mistral': 684, 'n_tokens_neox': 667, 'n_words': 236}