module Skellington
describe CLI do
let :subject do
described_class.new
end
context 'layout' do
it 'creates a header' do
subject.generate 'dummy-app'
expect('dummy_app/views/includes/header.erb').to have_content (
"""
<%= erb :'includes/ie-cruft' %>
<%= erb :'includes/js-libs' %>
<%= erb :'includes/css-libs' %>
<%= erb :'includes/fonts-libs' %>
<%= @title %>
"""
)
end
it 'creates a footer' do
subject.generate 'dummy-app'
expect('dummy_app/views/includes/footer.erb').to have_content (
"""
"""
)
end
it 'creates a github corner' do
subject.generate 'dummy-app'
expect('dummy_app/views/includes/github-corner.erb').to have_content (
"""
"""
)
end
it 'creates a layout' do
subject.generate 'dummy-app'
expect('dummy_app/views/layout.erb').to have_content (
"""
<%= erb :'includes/header' %>
<%= erb :'includes/github-corner' if @github_url %>
<%= yield %>
<%= erb :'includes/footer' %>
"""
)
end
end
end
end