Feature: Seivan HTML5 Generator with HAML
In order to have a layout in HTML5 with HAML
As a rails developer
I want to generate a simple layout in HTML5 with HAML
Background:
Given a new Rails app
When I run "rails g seivan:html5 --haml -f"
Scenario: Generate application layout with HTMl5 boilerplate
Then I should see file "app/views/layouts/application.html.haml"
And I should see "!!! 5" in file "app/views/layouts/application.html.haml"
And I should see "= render :partial => 'layouts/head'" in file "app/views/layouts/application.html.haml"
And I should see "= render :partial => 'layouts/header'" in file "app/views/layouts/application.html.haml"
And I should see "= render :partial => 'layouts/flashes'" in file "app/views/layouts/application.html.haml"
And I should see "= render :partial => 'layouts/footer'" in file "app/views/layouts/application.html.haml"
And I should see "= render :partial => 'layouts/javascripts'" in file "app/views/layouts/application.html.haml"
Scenario: Generate head partial with rendering stylesheets with a yield :stylesheets
Then I should see file "app/views/layouts/_head.html.haml"
And I should see "= render :partial => 'layouts/stylesheets'" in file "app/views/layouts/_head.html.haml"
Scenario: Generate stylesheet partial with a yield stylesheet
Then I should see file "app/views/layouts/_stylesheets.html.haml"
And I should see "= yield :stylesheets" in file "app/views/layouts/_stylesheets.html.haml"
Scenario: Generate header partial inside the header tag
Then I should see file "app/views/layouts/_header.html.haml"
And I should see "%header#header" in file "app/views/layouts/application.html.haml"
Scenario: Generate flashes partial
Then I should see file "app/views/layouts/_flashes.html.haml"
And I should see "%section#flash" in file "app/views/layouts/_flashes.html.haml"
Scenario: Generate footer partial under %footer#footer
Then I should see file "app/views/layouts/_footer.html.haml"
And I should see "%footer#footer" in file "app/views/layouts/application.html.haml"
And I should see "%small.copyright" in file "app/views/layouts/_footer.html.haml"
Scenario: Generate javascripts partial with a yield :javascripts
Then I should see file "app/views/layouts/_javascripts.html.haml"
And I should see "= yield :javascripts" in file "app/views/layouts/_javascripts.html.haml"
Scenario: Generate jQuery with jQuery UJS and include them
Then I should see file "public/javascripts/jquery.js"
And I should see file "public/javascripts/jquery_ujs.js"
And I should see "= javascript_include_tag 'jquery.js', 'jquery_ujs', 'application', :cache => true" in file "app/views/layouts/_javascripts.html.haml"