Sha256: 465c6a4b4dcea3d5bd6dc5dd4908b8d5f6726556fb49993901a764aca92d68f1

Contents?: true

Size: 951 Bytes

Versions: 9

Compression:

Stored size: 951 Bytes

Contents

require 'minitest_helper'

module SlideHero
  describe DSL do
    include SlideHero::DSL
    it "creates a presentation object at root object" do
      pres = presentation "I like turtles" do
        slide "Turtles are cool" do
          point "Not as cool as fezzes"
        end
      end
      pres.must_include "Turtles are cool"
    end

    it "passes code properly" do
      pres = presentation "Code" do
        slide "Code test" do
          code(:ruby, File.join(Dir.pwd,"test","fixtures")) do
            "testclass.rb"
          end
        end
      end

      pres.must_include "class Working"
    end
    it "handles defaults properly" do
      pres = presentation "Defaults" do
        defaults headline_size: :medium
        slide "Outer Slide"
        grouped_slides do
          slide "Inner Slide"
        end
      end
      pres.must_include "<h2>Outer Slide</h2>"
      pres.must_include "<h2>Inner Slide</h2>"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slide_hero-0.0.11 test/slide_hero/dsl_spec.rb
slide_hero-0.0.10 test/slide_hero/dsl_spec.rb
slide_hero-0.0.9 test/slide_hero/dsl_spec.rb
slide_hero-0.0.8 test/slide_hero/dsl_spec.rb
slide_hero-0.0.7 test/slide_hero/dsl_spec.rb
slide_hero-0.0.6 test/slide_hero/dsl_spec.rb
slide_hero-0.0.5 test/slide_hero/dsl_spec.rb
slide_hero-0.0.4 test/slide_hero/dsl_spec.rb
slide_hero-0.0.3 test/slide_hero/dsl_spec.rb