diff options
| author | mo k <mo@mokhan.ca> | 2012-09-18 12:05:57 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-09-18 12:05:57 -0600 |
| commit | 52cd080935d2f08653892ebe2e631453767d21cc (patch) | |
| tree | d35ab401649b5cd46d6124820e473d9a4ecece81 /spec/javascripts/support | |
| parent | 8b8f7d45e61cdcbc7b26ec4274e8b084bff47255 (diff) | |
reboot jasmine installation.
Diffstat (limited to 'spec/javascripts/support')
| -rw-r--r-- | spec/javascripts/support/jasmine.yml | 27 | ||||
| -rw-r--r-- | spec/javascripts/support/jasmine_config.rb | 23 | ||||
| -rw-r--r-- | spec/javascripts/support/jasmine_runner.rb | 20 |
3 files changed, 25 insertions, 45 deletions
diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index 117da10c..9bfa261a 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -2,15 +2,28 @@ # # 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/javascripts/application.js - - app/assets/javascripts/**/*.js + - assets/application.js # 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 @@ -19,6 +32,11 @@ stylesheets: # Return an array of filepaths relative to spec_dir to include before jasmine specs. # Default: ["helpers/**/*.js"] # +# EXAMPLE: +# +# helpers: +# - helpers/**/*.js +# helpers: - helpers/**/*.js @@ -27,6 +45,11 @@ helpers: # 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' diff --git a/spec/javascripts/support/jasmine_config.rb b/spec/javascripts/support/jasmine_config.rb deleted file mode 100644 index 47286f23..00000000 --- a/spec/javascripts/support/jasmine_config.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Jasmine - class Config - - # Add your overrides or custom config code here - - end -end - - -# Note - this is necessary for rspec2, which has removed the backtrace -module Jasmine - class SpecBuilder - def declare_spec(parent, spec) - me = self - example_name = spec["name"] - @spec_ids << spec["id"] - backtrace = @example_locations[parent.description + " " + example_name] - parent.it example_name, {} do - me.report_spec(spec["id"]) - end - end - end -end diff --git a/spec/javascripts/support/jasmine_runner.rb b/spec/javascripts/support/jasmine_runner.rb deleted file mode 100644 index de6c1326..00000000 --- a/spec/javascripts/support/jasmine_runner.rb +++ /dev/null @@ -1,20 +0,0 @@ -$:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes - -require 'rubygems' -require 'jasmine' -require 'rspec' -jasmine_config_overrides = File.expand_path(File.join(File.dirname(__FILE__), 'jasmine_config.rb')) -require jasmine_config_overrides if File.exists?(jasmine_config_overrides) - -jasmine_config = Jasmine::Config.new -spec_builder = Jasmine::SpecBuilder.new(jasmine_config) - -should_stop = false - -RSpec.configuration.after(:suite) do - spec_builder.stop if should_stop -end - -spec_builder.start -should_stop = true -spec_builder.declare_suites
\ No newline at end of file |
