Run specs against separate and concatenated files
- also get rid of spec/javascripts, since there's only js here
This commit is contained in:
parent
c9ec591514
commit
9322af290a
60
Gemfile.lock
60
Gemfile.lock
@ -1,38 +1,41 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
childprocess (0.3.9)
|
||||
childprocess (0.5.3)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
cmdparse (2.0.5)
|
||||
ffi (1.9.0)
|
||||
highline (1.6.20)
|
||||
jasmine (2.0.0)
|
||||
cmdparse (2.0.6)
|
||||
ffi (1.9.3)
|
||||
highline (1.6.21)
|
||||
jasmine (2.0.2)
|
||||
jasmine-core (~> 2.0.0)
|
||||
phantomjs
|
||||
rack (>= 1.2.1)
|
||||
rake
|
||||
jasmine-core (2.0.0)
|
||||
jasmine_selenium_runner (0.1.1)
|
||||
jasmine-core (2.0.1)
|
||||
jasmine_selenium_runner (0.2.0)
|
||||
jasmine (~> 2.0.0.alpha)
|
||||
sauce-connect
|
||||
selenium-webdriver (~> 2.35)
|
||||
json (1.8.1)
|
||||
mime-types (2.0)
|
||||
multi_json (1.9.0)
|
||||
net-http-persistent (2.9)
|
||||
net-ssh (2.7.0)
|
||||
mime-types (1.25.1)
|
||||
multi_json (1.10.1)
|
||||
net-http-persistent (2.9.4)
|
||||
net-ssh (2.9.1)
|
||||
net-ssh-gateway (1.2.0)
|
||||
net-ssh (>= 2.6.5)
|
||||
parallel (0.9.0)
|
||||
parallel_tests (0.15.0)
|
||||
parallel (1.1.2)
|
||||
parallel_tests (0.16.6)
|
||||
parallel
|
||||
phantomjs (1.9.7.0)
|
||||
phantomjs (1.9.7.1)
|
||||
rack (1.5.2)
|
||||
rake (0.9.2.2)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rubyzip (1.0.0)
|
||||
sauce (3.2.0)
|
||||
rake (10.3.2)
|
||||
rdoc (4.1.1)
|
||||
json (~> 1.4)
|
||||
rest-client (1.6.8)
|
||||
mime-types (~> 1.16)
|
||||
rdoc (>= 2.4.2)
|
||||
rubyzip (1.1.6)
|
||||
sauce (3.4.9)
|
||||
childprocess (>= 0.1.6)
|
||||
cmdparse (>= 2.0.2)
|
||||
highline (>= 1.5.0)
|
||||
@ -40,18 +43,19 @@ GEM
|
||||
net-http-persistent
|
||||
net-ssh
|
||||
net-ssh-gateway
|
||||
parallel_tests (= 0.15.0)
|
||||
parallel_tests (= 0.16.6)
|
||||
rest-client
|
||||
sauce_whisk (~> 0.0.8)
|
||||
sauce_whisk (~> 0.0.11)
|
||||
selenium-webdriver (>= 0.1.2)
|
||||
sauce-connect (3.2.0)
|
||||
sauce (~> 3.2)
|
||||
sauce_whisk (0.0.10)
|
||||
rest-client
|
||||
selenium-webdriver (2.37.0)
|
||||
childprocess (>= 0.2.5)
|
||||
sauce-connect (3.4.1)
|
||||
sauce (~> 3.4)
|
||||
sauce_whisk (0.0.13)
|
||||
json (~> 1.8.1)
|
||||
rest-client (~> 1.6.7)
|
||||
selenium-webdriver (2.42.0)
|
||||
childprocess (>= 0.5.0)
|
||||
multi_json (~> 1.0)
|
||||
rubyzip (~> 1.0.0)
|
||||
rubyzip (~> 1.0)
|
||||
websocket (~> 1.0.4)
|
||||
websocket (1.0.7)
|
||||
|
||||
|
9
Rakefile
9
Rakefile
@ -3,4 +3,13 @@ require 'jasmine'
|
||||
require 'jasmine_selenium_runner'
|
||||
load 'jasmine/tasks/jasmine.rake'
|
||||
|
||||
namespace :jasmine do
|
||||
task :set_env do
|
||||
ENV['JASMINE_SELENIUM_CONFIG_PATH'] ||= 'spec/support/jasmine_selenium_runner.yml'
|
||||
ENV['JASMINE_CONFIG_PATH'] ||= 'spec/support/jasmine.yml'
|
||||
end
|
||||
end
|
||||
|
||||
task "jasmine:configure" => "jasmine:set_env"
|
||||
|
||||
task :default => "jasmine:ci"
|
||||
|
@ -1,82 +0,0 @@
|
||||
src_dir: .
|
||||
|
||||
src_files:
|
||||
- lib/mock-ajax.js
|
||||
|
||||
spec_dir:
|
||||
- spec
|
||||
|
||||
spec_files:
|
||||
- javascripts/*-spec.js
|
||||
|
||||
helpers:
|
||||
- javascripts/helpers/spec-helper.js
|
||||
|
||||
stylesheets:
|
||||
|
||||
# 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
|
||||
#
|
||||
|
||||
# stylesheets
|
||||
#
|
||||
# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
|
||||
# Default: []
|
||||
#
|
||||
# EXAMPLE:
|
||||
#
|
||||
# stylesheets:
|
||||
# - css/style.css
|
||||
# - stylesheets/*.css
|
||||
#
|
||||
|
||||
# helpers
|
||||
#
|
||||
# Return an array of filepaths relative to spec_dir to include before jasmine specs.
|
||||
# Default: ["helpers/**/*.js"]
|
||||
#
|
||||
# EXAMPLE:
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# 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
|
||||
#
|
||||
|
||||
# spec_dir
|
||||
#
|
||||
# Spec directory path. Your spec_files must be returned relative to this path.
|
||||
# Default: spec/javascripts
|
||||
#
|
||||
# EXAMPLE:
|
||||
#
|
||||
# spec_dir: spec/javascripts
|
||||
#
|
18
spec/support/jasmine.yml
Normal file
18
spec/support/jasmine.yml
Normal file
@ -0,0 +1,18 @@
|
||||
src_dir: src
|
||||
|
||||
src_files:
|
||||
- requireAjax.js
|
||||
- '[^b]*.js' # skip boot.js so it's at the end
|
||||
- boot.js
|
||||
|
||||
spec_dir:
|
||||
- spec
|
||||
|
||||
spec_files:
|
||||
- '*-spec.js'
|
||||
|
||||
helpers:
|
||||
- helpers/spec-helper.js
|
||||
|
||||
stylesheets:
|
||||
|
16
spec/support/jasmine_combined.yml
Normal file
16
spec/support/jasmine_combined.yml
Normal file
@ -0,0 +1,16 @@
|
||||
src_dir: lib
|
||||
|
||||
src_files:
|
||||
- mock-ajax.js
|
||||
|
||||
spec_dir:
|
||||
- spec
|
||||
|
||||
spec_files:
|
||||
- '*-spec.js'
|
||||
|
||||
helpers:
|
||||
- helpers/spec-helper.js
|
||||
|
||||
stylesheets:
|
||||
|
@ -11,4 +11,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
grunt jshint && bundle exec rake jasmine:ci
|
||||
grunt jshint
|
||||
bundle exec rake jasmine:ci
|
||||
JASMINE_CONFIG_PATH=spec/support/jasmine_combined.yml bundle exec rake jasmine:ci
|
||||
|
Loading…
Reference in New Issue
Block a user