Tests for :sass_cache_path custom config
First time working with Cucumber, so perhaps not the best way to do things. * Tests for default setting which stores the .sass_cache directory in Middleman app root. * Tests for custom setting which stores the .sass_cache directory in /tmp directory. Please Note! Unable to test the output of the default .sass_cache location since the directory is stored outside of the app root during testing, but inside app root in "production"
This commit is contained in:
parent
1de1d3d25e
commit
c00f9d5782
5 changed files with 36 additions and 0 deletions
22
middleman-more/features/sass_cache_path.feature
Normal file
22
middleman-more/features/sass_cache_path.feature
Normal file
|
@ -0,0 +1,22 @@
|
|||
Feature: SASS .sass_cache custom location
|
||||
|
||||
Scenario: Using the default location for .sass_cache folder
|
||||
Given the Server is running at "sass-cache-path-default-app"
|
||||
|
||||
When I go to "/stylesheets/plain.css"
|
||||
Then I should see "color: blue;"
|
||||
|
||||
# TODO::
|
||||
# Not sure how to test this location, as the directory is stored outside of the app root
|
||||
# during testing, but inside app root in "production"
|
||||
|
||||
# Then a directory named ".sass_cache" should exist
|
||||
|
||||
|
||||
Scenario: Using a custom location for .sass_cache folder
|
||||
Given the Server is running at "sass-cache-path-custom-app"
|
||||
|
||||
When I go to "/stylesheets/plain.css"
|
||||
Then I should see "html, body, div, span, applet, object, iframe,"
|
||||
|
||||
Then a directory named "/tmp/middleman-more-custom-sass_cache_path" should exist
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
set :sass_cache_path, File.join('/tmp', "#{File.basename(Dir.pwd)}-custom-sass_cache_path")
|
|
@ -0,0 +1,4 @@
|
|||
@import "compass/reset"
|
||||
|
||||
red
|
||||
color: blue
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
# Using default setting
|
||||
# set :sass_cache_path, File.join(Dir.pwd, '.sass_cache')
|
|
@ -0,0 +1,4 @@
|
|||
@import "compass/reset"
|
||||
|
||||
red
|
||||
color: blue
|
Loading…
Add table
Reference in a new issue