module Skellington describe CLI do context 'jekyll' do let :subject do described_class.new end context 'layout' do it 'creates a header' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_includes/header.html').to have_content ( """ {% include ie-cruft.html %} {% include libs.html %} {{ page.title }} """ ) end it 'creates a footer' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_includes/footer.html').to have_content ( """ """ ) end it 'creates a nav' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_includes/nav.html').to have_content ( """ """ ) end it 'creates a JS libs section' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_includes/libs.html').to have_content ( """ {% for lib in site.data.libs.js %} {% endfor %} {% for lib in site.data.libs.css %} {% endfor %} {% for font in site.data.libs.fonts %} {% endfor %} """ ) end it 'creates a layout' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_layouts/default.html').to have_content ( """ {% include header.html %} {% include nav.html %}
{{ content }}
{% include footer.html %} """ ) end it 'has the ie shims' do subject.options = { 'framework' => 'jekyll' } subject.generate 'dummy-app' expect('dummy_app/_includes/ie-cruft.html').to have_content ( """ """ ) end end end end end