Move spec files back out of spec/javascripts
- Jasmine gem allows us to specify a path to jasmine.yml via ENV [finish #58126010]
This commit is contained in:
@@ -1,113 +0,0 @@
|
||||
// Jasmine boot.js for browser runners - exposes external/global interface, builds the Jasmine environment and executes it.
|
||||
(function() {
|
||||
|
||||
window.jasmine = jasmineRequire.core(jasmineRequire);
|
||||
jasmineRequire.html(jasmine);
|
||||
|
||||
var env = jasmine.getEnv();
|
||||
|
||||
var jasmineInterface = {
|
||||
describe: function(description, specDefinitions) {
|
||||
return env.describe(description, specDefinitions);
|
||||
},
|
||||
|
||||
xdescribe: function(description, specDefinitions) {
|
||||
return env.xdescribe(description, specDefinitions);
|
||||
},
|
||||
|
||||
it: function(desc, func) {
|
||||
return env.it(desc, func);
|
||||
},
|
||||
|
||||
xit: function(desc, func) {
|
||||
return env.xit(desc, func);
|
||||
},
|
||||
|
||||
beforeEach: function(beforeEachFunction) {
|
||||
return env.beforeEach(beforeEachFunction);
|
||||
},
|
||||
|
||||
afterEach: function(afterEachFunction) {
|
||||
return env.afterEach(afterEachFunction);
|
||||
},
|
||||
|
||||
expect: function(actual) {
|
||||
return env.expect(actual);
|
||||
},
|
||||
|
||||
pending: function() {
|
||||
return env.pending();
|
||||
},
|
||||
|
||||
addMatchers: function(matchers) {
|
||||
return env.addMatchers(matchers);
|
||||
},
|
||||
|
||||
spyOn: function(obj, methodName) {
|
||||
return env.spyOn(obj, methodName);
|
||||
},
|
||||
|
||||
clock: env.clock,
|
||||
jsApiReporter: new jasmine.JsApiReporter({
|
||||
timer: new jasmine.Timer()
|
||||
})
|
||||
};
|
||||
|
||||
if (typeof window == "undefined" && typeof exports == "object") {
|
||||
extend(exports, jasmineInterface);
|
||||
} else {
|
||||
extend(window, jasmineInterface);
|
||||
}
|
||||
|
||||
var queryString = new jasmine.QueryString({
|
||||
getWindowLocation: function() { return window.location; }
|
||||
});
|
||||
|
||||
// TODO: move all of catching to raise so we don't break our brains
|
||||
var catchingExceptions = queryString.getParam("catch");
|
||||
env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
|
||||
|
||||
var htmlReporter = new jasmine.HtmlReporter({
|
||||
env: env,
|
||||
queryString: queryString,
|
||||
onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); },
|
||||
getContainer: function() { return document.body; },
|
||||
createElement: function() { return document.createElement.apply(document, arguments); },
|
||||
createTextNode: function() { return document.createTextNode.apply(document, arguments); },
|
||||
timer: new jasmine.Timer()
|
||||
});
|
||||
|
||||
env.addReporter(jasmineInterface.jsApiReporter);
|
||||
env.addReporter(htmlReporter);
|
||||
|
||||
var specFilter = new jasmine.HtmlSpecFilter({
|
||||
filterString: function() { return queryString.getParam("spec"); }
|
||||
});
|
||||
|
||||
env.specFilter = function(spec) {
|
||||
return specFilter.matches(spec.getFullName());
|
||||
};
|
||||
|
||||
var currentWindowOnload = window.onload;
|
||||
|
||||
window.onload = function() {
|
||||
if (currentWindowOnload) {
|
||||
currentWindowOnload();
|
||||
}
|
||||
htmlReporter.initialize();
|
||||
|
||||
// By the time onload is called, jasmineRequire will be redefined to point
|
||||
// to the Jasmine source files (and not jasmine.js). So re-require
|
||||
window.j$ = jasmineRequire.core(jasmineRequire);
|
||||
jasmineRequire.html(j$);
|
||||
jasmineRequire.console(jasmineRequire, j$);
|
||||
|
||||
env.execute();
|
||||
};
|
||||
|
||||
function extend(destination, source) {
|
||||
for (var property in source) destination[property] = source[property];
|
||||
return destination;
|
||||
}
|
||||
|
||||
}());
|
||||
@@ -1,14 +0,0 @@
|
||||
src_dir:
|
||||
- 'src'
|
||||
src_files:
|
||||
- '**/*.js'
|
||||
boot_dir: 'spec/javascripts/support'
|
||||
boot_files:
|
||||
- 'dev_boot.js'
|
||||
helpers:
|
||||
- 'helpers/**/*.js'
|
||||
spec_files:
|
||||
- 'performance/performance_test.js'
|
||||
spec_dir:
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#This 'magic' inclusion order allows the travis build to pass.
|
||||
#TODO: search for the correct files to include to prevent
|
||||
src_dir:
|
||||
- 'src'
|
||||
src_files:
|
||||
- 'core/base.js'
|
||||
- 'core/util.js'
|
||||
#end of known dependencies
|
||||
- 'core/Spec.js'
|
||||
- 'core/Env.js'
|
||||
- 'core/JsApiReporter.js'
|
||||
- 'core/PrettyPrinter.js'
|
||||
- 'core/Suite.js'
|
||||
- 'core/**/*.js'
|
||||
- 'html/**.js'
|
||||
- '**/*.js'
|
||||
stylesheets:
|
||||
boot_dir: 'spec/javascripts/support'
|
||||
boot_files:
|
||||
- 'dev_boot.js'
|
||||
helpers:
|
||||
- 'helpers/**/*.js'
|
||||
spec_files:
|
||||
- '**/*[Ss]pec.js'
|
||||
spec_dir:
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
use_sauce: <%= ENV['USE_SAUCE'] %>
|
||||
browser: <%= ENV['JASMINE_BROWSER'] %>
|
||||
sauce:
|
||||
name: jasmine-core <%= Time.now.to_s %>
|
||||
username: <%= ENV['SAUCE_USERNAME'] %>
|
||||
access_key: <%= ENV['SAUCE_ACCESS_KEY'] %>
|
||||
build: <%= ENV['TRAVIS_BUILD_NUMBER'] || 'Ran locally' %>
|
||||
tags:
|
||||
- <%= ENV['TRAVIS_RUBY_VERSION'] || RUBY_VERSION %>
|
||||
- CI
|
||||
tunnel_identifier: <%= ENV['TRAVIS_JOB_NUMBER'] ? %Q("#{ENV['TRAVIS_JOB_NUMBER']}") : nil %>
|
||||
os: <%= ENV['SAUCE_OS'] %>
|
||||
browser_version: <%= ENV['SAUCE_BROWSER_VERSION'] %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user