Sha256: 1746cd9016671486bc80570b79c0d004388299cf78b4167b9939f848c637a581

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

require 'spec_helper'

module RevealCK
  describe PresentationDSL do

    let :dsl_file do
      spec_data 'presentation_dsl', 'dsl.rb'
    end

    let :presentation do
      PresentationDSL.load dsl_file
    end

    describe '.load' do
      it 'can build a RevealCK::Presentation from a file' do
        result = PresentationDSL.load dsl_file
        expect(result).to be_a Presentation
      end
    end

    describe 'A Presentation loaded from a dsl' do

      let :html do
        presentation.html
      end

      it 'retains the author in the dsl file' do
        expect(presentation.author).to eq 'Presentation Author'
      end

      it 'retains the theme in the dsl file' do
        expect(presentation.theme).to eq 'night'
      end

      it 'retains the title in the dsl file' do
        expect(presentation.title).to eq 'Presentation Title'
      end

      it 'retains the transition in the dsl file' do
        expect(presentation.transition).to eq 'page'
      end

      it 'retains the slides defined in the dsl file' do
        expect(html).to include 'Hello World'
        expect(html).to include 'Thanks!'
        expect(html).to include 'module RevealCK'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reveal-ck-0.2.0 spec/lib/reveal-ck/presentation_dsl_spec.rb
reveal-ck-0.1.8 spec/lib/reveal-ck/presentation_dsl_spec.rb
reveal-ck-0.1.7 spec/lib/reveal-ck/presentation_dsl_spec.rb