--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
Essentially the jasmine.yml file now takes asset_pipeline_paths, each
path you pass here will be mapped through the Sprockets asset
pipeline. We have a bit of a 'hack' in order to permit running files
in the spec directory through Sprockets -- if one of your
asset_pipeline_paths matches your spec_dir, we'll assume you want to
use Sprockets for specs (there's a long story about why the spec dir
gets mapped as __spec__ inside of relative to root, something we might
re-examine in Jasmine 2).
Files passed in will now have any Sprocket compatible engine
extensions stripped off so that we correctly request them from
Sprockets -- ie, app/assets/my_file.js.coffee will be requested by
Jasmine as /app/assets/my_file.js.
I believe Jasmine should do the right thing if you hand it scss files
in your stylesheets and coffee files in your helpers, but I haven't
yet tested it.
This is a pretty minimal spike, so there may be other issues; hoping
this meets the 80% case for most people -- please feel free to offer
your feedback!
Thanks!
Rajan
PS:
Here's a sample configuration file to use coffeescript for your src and specs:
# src_files
#
# Return an array of filepaths relative to src_dir to include before
jasmine specs.
# Default: []
#
# EXAMPLE:
#
# src_files:
# - lib/source1.js
# - lib/source2.js
# - dist/**/*.js
#
src_files:
- "app/assets/**/*.coffee"
# stylesheets
#
# Return an array of stylesheet filepaths relative to src_dir to
include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# stylesheets:
# - css/style.css
# - stylesheets/*.css
#
stylesheets:
- stylesheets/**/*.css
# helpers
#
# Return an array of filepaths relative to spec_dir to include before
jasmine specs.
# Default: ["helpers/**/*.js"]
#
# EXAMPLE:
#
# helpers:
# - helpers/**/*.js
#
helpers:
- helpers/**/*.js
# spec_files
#
# Return an array of filepaths relative to spec_dir to include.
# Default: ["**/*[sS]pec.js"]
#
# EXAMPLE:
#
# spec_files:
# - **/*[sS]pec.js
#
spec_files:
- '**/*[sS]pec.js.coffee'
# src_dir
#
# Source directory path. Your src_files must be returned relative to
this path. Will use root if left blank.
# Default: project root
#
# EXAMPLE:
#
# src_dir: public
#
src_dir:
# spec_dir
#
# Spec directory path. Your spec_files must be returned relative to this path.
# Default: spec/javascripts
#
# EXAMPLE:
#
# spec_dir: spec/javascripts
#
spec_dir: spec/javascripts
# asset_pipeline_paths
#
# Paths you would like to be served by the Sprockets asset pipeline.
#
# If you include your spec_dir (eg: - spec/javascripts ) here,
# Jasmine will use the Sprockets asset pipeline to build your spec files.
#
# Default: []
#
# EXAMPLE:
# asset_pipeline_paths:
# - app/assets
# - spec/javascripts
asset_pipeline_paths:
- app/assets
- spec/javascripts
As an alternative look at the jasminerice gem which does work with the rails 3.1 asset pipeline.
https://github.com/bradphelan/jasminerice
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.