2011-06-02 19:48:56 +02:00
|
|
|
Feature: Support slim templating language
|
|
|
|
In order to offer an alternative to Haml
|
|
|
|
|
|
|
|
Scenario: Rendering Slim
|
2012-04-27 01:21:53 +02:00
|
|
|
Given an empty app
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
And a file named "source/slim.html.slim" with:
|
|
|
|
"""
|
|
|
|
doctype 5
|
|
|
|
html lang='en'
|
|
|
|
head
|
|
|
|
meta charset="utf-8"
|
|
|
|
|
|
|
|
body
|
|
|
|
h1 Welcome to Slim
|
|
|
|
"""
|
|
|
|
And the Server is running at "empty_app"
|
2011-06-02 19:48:56 +02:00
|
|
|
When I go to "/slim.html"
|
2012-08-16 22:48:34 +02:00
|
|
|
Then I should see "<h1>Welcome to Slim</h1>"
|
|
|
|
|
|
|
|
Scenario: Rendering Scss in a Slim filter
|
|
|
|
Given an empty app
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
2014-04-07 21:43:16 +02:00
|
|
|
require 'middleman-compass'
|
|
|
|
activate :compass
|
2012-08-16 22:48:34 +02:00
|
|
|
"""
|
|
|
|
And a file named "source/scss.html.slim" with:
|
|
|
|
"""
|
|
|
|
doctype 5
|
|
|
|
html lang='en'
|
|
|
|
head
|
|
|
|
meta charset="utf-8"
|
|
|
|
scss:
|
|
|
|
@import "compass";
|
|
|
|
@include global-reset;
|
|
|
|
body
|
|
|
|
h1 Welcome to Slim
|
|
|
|
"""
|
|
|
|
And a file named "source/sass.html.slim" with:
|
|
|
|
"""
|
|
|
|
doctype 5
|
|
|
|
html lang='en'
|
|
|
|
head
|
|
|
|
meta charset="utf-8"
|
|
|
|
sass:
|
|
|
|
@import "compass"
|
|
|
|
+global-reset
|
|
|
|
body
|
|
|
|
h1 Welcome to Slim
|
|
|
|
"""
|
|
|
|
And a file named "source/error.html.slim" with:
|
|
|
|
"""
|
|
|
|
doctype 5
|
|
|
|
html lang='en'
|
|
|
|
head
|
|
|
|
meta charset="utf-8"
|
|
|
|
scss:
|
|
|
|
+global-reset
|
|
|
|
body
|
|
|
|
h1 Welcome to Slim
|
|
|
|
"""
|
|
|
|
And the Server is running at "empty_app"
|
|
|
|
When I go to "/scss.html"
|
|
|
|
Then I should see "html, body, div"
|
|
|
|
When I go to "/sass.html"
|
|
|
|
Then I should see "html, body, div"
|
|
|
|
When I go to "/error.html"
|
|
|
|
Then I should see "Syntax error"
|