Sha256: dd3a97e69e72d5c671c50837c945e7ba4f5db86a5d470225d08c82bd271a0af8
Contents?: true
Size: 1.24 KB
Versions: 19
Compression:
Stored size: 1.24 KB
Contents
require 'spec_helper' require 'tmpdir' require 'rake' module RevealCK module Builders describe CreateIndexHtml do it 'creates a reveal.js index.html' do Dir.mktmpdir do |dir| Dir.chdir(dir) do slides_html = 'slides.html' File.open(slides_html, 'w') do |file| file.puts('<section>') file.puts('<h1>Slides</h1>') file.puts('</section>') end index_html_erb = RevealCK.template_path('index.html', 'index.html.erb') application = Rake::Application.new create_index_html = CreateIndexHtml.new(slides_html: slides_html, template: index_html_erb, output_dir: dir, config: Config.new, application: application) create_index_html.prepare application['create_index_html'].invoke expect(File.exist?('index.html')).to be true content = File.open('index.html', 'r').read expect(content).to include '<h1>Slides</h1>' end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems