require 'spec_helper' module RevealCK module Builders describe IndexHtml do let(:version) { RevealCK::VERSION } let :index_html_erb do RevealCK.template_path('index.html', 'index.html.erb') end let :slides_html do spec_data('builders', 'index_html', 'slides.html') end let :config do config = Config.new config.title = 'Sample Title' config.description = 'Sample Description' config.author = 'Sample Author' config.theme = 'night' config.transition = 'page' config end let :index_html do IndexHtml.new(template: index_html_erb, slides_html: slides_html, config: config) end let :rendered_content do index_html.render end it 'is created with a file location and a config' do expect(index_html.template).to include 'index.html.erb' expect(index_html.config.title).to eq config.title end it 'can render html' do expect(rendered_content) .to include('') end it 'prints the program name and version in the generator tag' do expect(rendered_content) .to include(%()) end it 'supports replacing the configured title' do expect(rendered_content) .to include('Sample Title') end it 'support replacing the configured description' do expect(rendered_content) .to include('') end it 'supports replacing the configured author' do expect(rendered_content) .to include('') end it 'supports replacing the configured theme' do expect(rendered_content) .to include('