jasmine-headless-webkit-pre.../intro/02_install.md

93 lines
1.8 KiB
Markdown
Raw Normal View History

2011-12-12 14:46:21 +00:00
!SLIDE
# Installing
!SLIDE
# Qt 4.7 or above
!SLIDE
2011-12-13 21:42:53 +00:00
# johnbintz.github.com/jasmine-headless-webkit
2011-12-12 14:46:21 +00:00
!SLIDE
2011-12-13 21:42:53 +00:00
# `gem install jasmine-headless-webkit`
2011-12-12 14:46:21 +00:00
!SLIDE
# Gemfile
@@@ ruby
gem 'jasmine-headless-webkit', '~> 0.8.0'
!SLIDE
# Rails 3.1 Application
2011-12-13 21:42:53 +00:00
!SLIDE
# Legacy Jasmine gem support
2011-12-12 14:46:21 +00:00
!SLIDE
# spec/javascripts/support/jasmine.yml
@@@ yaml
src_dir: app/assets/javascripts
asset_paths:
- lib/assets/javascripts
- vendor/assets/javascripts
src_files: [ '**/*' ]
spec_dir: spec/javascripts
spec_files: [ '**/*[Ss]pec.*' ]
helpers: [ 'helpers/**/*' ]
!SLIDE
2011-12-13 21:42:53 +00:00
# JavaScript Load Paths
2011-12-12 14:46:21 +00:00
!SLIDE
# Sprockets and Jasmine load files differently
!SLIDE
2011-12-13 21:42:53 +00:00
# The Sprockets Way
2011-12-12 14:46:21 +00:00
!SLIDE
# spec/javascripts/support/jasmine.yml
@@@ yaml
src_dir: app/assets/javascripts
asset_paths:
- lib/assets/javascripts
- vendor/assets/javascripts
spec_dir: spec/javascripts
!SLIDE
@@@ ruby
# ...somewhere in JHW...
env.append_path "app/assets/javascripts"
env.append_path "lib/assets/javascripts"
env.append_path "vendor/assets/javascripts"
env.append_path "spec/javascripts"
!SLIDE
@@@ javascript
//= require backbone/models/cat
//= require backbone/collections/cats
//= require backbone/views/global_view
class window.CatsView extends GlobalView
!SLIDE
2011-12-13 21:42:53 +00:00
# The Jasmine Way
2011-12-12 14:46:21 +00:00
@@@ yaml
src_dir: app/assets/javascripts
src_files: [ '**/*' ]
spec_dir: spec/javascripts
spec_files: [ '**/*[Ss]pec.*' ]
helpers: [ 'helpers/**/*' ]
!SLIDE
@@@ ruby
Dir["app/assets/javascripts/**/*"]
Dir["spec/javascripts/**/*[Ss]pec.*"]
Dir["spec/javascripts/helpers/**/*"]
!SLIDE
# JHW ensures that no file is loaded twice
!SLIDE
# Ensures Sprockets dependencies are loaded in the right order