spec/jekyll/layout/layout_spec.rb in skellington-0.8.4 vs spec/jekyll/layout/layout_spec.rb in skellington-0.8.5
- old
+ new
@@ -62,19 +62,54 @@
</div>
"""
)
end
+ it 'creates a nav' do
+ subject.options = { 'framework' => 'jekyll' }
+ subject.generate 'dummy-app'
+
+ expect('dummy_app/_includes/nav.html').to have_content (
+ """
+ <nav class='navbar navbar-default navbar-static-top'>
+ <div class='container-fluid'>
+ <div class='navbar-header'>
+ <button type='button'
+ class='navbar-toggle collapsed'
+ data-toggle='collapse'
+ data-target='#navbar'
+ aria-expanded='false'
+ aria-controls='navbar'>
+ <span class='sr-only'>Toggle navigation</span>
+ <span class='icon-bar'></span>
+ <span class='icon-bar'></span>
+ <span class='icon-bar'></span>
+ </button>
+ <a class='navbar-brand' href='/'>Home</a>
+ </div>
+ <div id='navbar' class='navbar-collapse collapse'>
+ <ul class='nav navbar-nav'>
+ <li><a href='/foo'>Foo</a></li>
+ <li><a href='/bar'>Bar</a></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ """
+ )
+ end
+
it 'creates a layout' do
subject.options = { 'framework' => 'jekyll' }
subject.generate 'dummy-app'
expect('dummy_app/_layouts/default.html').to have_content (
"""
<!DOCTYPE html>
<html lang='en'>
{% include header.html %}
<body>
+ {% include nav.html %}
<div class='container'>
{{ content }}
</div>
{% include footer.html %}
</body>