diff --git a/features/generate-with-config.feature b/features/generate-with-config.feature
index f09d73f..d57ba3e 100644
--- a/features/generate-with-config.feature
+++ b/features/generate-with-config.feature
@@ -16,10 +16,11 @@ Feature: The capabilities of config.yml
Scenario: Generating slides with a template and config.yml
Given a file named "config.yml" with:
"""
- title: "Awesome Title"
- author: "Awesome Author"
- theme: "night"
- transition: "page"
+ title: "Awesome Title"
+ author: "Awesome Author"
+ theme: "night"
+ transition: "page"
+ description: "My beautiful slides"
"""
Given a file named "slides.haml" with:
"""
@@ -42,6 +43,14 @@ Feature: The capabilities of config.yml
"""
And the file "slides/index.html" should contain:
"""
+
+ """
+ And the file "slides/index.html" should contain:
+ """
+
"""
And the file "slides/index.html" should contain:
diff --git a/files/reveal-ck/templates/index.html/head.html.erb b/files/reveal-ck/templates/index.html/head.html.erb
index 225089e..f2f549f 100644
--- a/files/reveal-ck/templates/index.html/head.html.erb
+++ b/files/reveal-ck/templates/index.html/head.html.erb
@@ -2,8 +2,9 @@
<%= config.title %>
-
+
+
diff --git a/lib/reveal-ck/config.rb b/lib/reveal-ck/config.rb
index 1eaae4d..c66ed48 100644
--- a/lib/reveal-ck/config.rb
+++ b/lib/reveal-ck/config.rb
@@ -22,10 +22,11 @@ def defaults
def core_defaults
{
- 'title' => 'Slides',
- 'author' => '',
- 'theme' => 'black',
- 'transition' => 'default',
+ 'title' => 'Slides',
+ 'description' => '',
+ 'author' => '',
+ 'theme' => 'black',
+ 'transition' => 'default',
'data' => {
}
diff --git a/spec/lib/reveal-ck/builders/index_html_spec.rb b/spec/lib/reveal-ck/builders/index_html_spec.rb
index 1f640e0..48ede44 100644
--- a/spec/lib/reveal-ck/builders/index_html_spec.rb
+++ b/spec/lib/reveal-ck/builders/index_html_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
module RevealCK
+ VERSION = '1.0'
+
module Builders
describe IndexHtml do
let :index_html_erb do
@@ -15,6 +17,7 @@ module Builders
let :config do
config = Config.new
config.title = 'Sample Title'
+ config.description = 'Sample Description'
config.author = 'Sample Author'
config.theme = 'night'
config.transition = 'page'
@@ -41,11 +44,21 @@ module Builders
.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('')
diff --git a/spec/lib/reveal-ck/config_spec.rb b/spec/lib/reveal-ck/config_spec.rb
index c585335..d33fe9b 100644
--- a/spec/lib/reveal-ck/config_spec.rb
+++ b/spec/lib/reveal-ck/config_spec.rb
@@ -34,6 +34,15 @@ module RevealCK
expect(config.title).to eq 'My Presentation'
end
+ it 'supplies a default description' do
+ expect(config.description).to eq ''
+ end
+
+ it 'supplies a #description, and #description=' do
+ config.description = 'My beautiful slides'
+ expect(config.description).to eq 'My beautiful slides'
+ end
+
it 'supplies a default transition' do
expect(config.transition).to eq 'default'
end