Skip to content

Commit 1e55495

Browse files
committed
Update test suite
Now using Ember 1.9 & Handlebars 2.0
1 parent f558639 commit 1e55495

13 files changed

+78
-75
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# dependencies
88
/node_modules
9-
/bower_components/*
9+
/bower_components
1010

1111
# misc
1212
/.sass-cache

.jshintrc

+30-52
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,32 @@
11
{
2-
"predef": [
3-
"console",
4-
"Ember",
5-
"DS",
6-
"Handlebars",
7-
"Metamorph",
8-
"ember_assert",
9-
"ember_warn",
10-
"ember_deprecate",
11-
"ember_deprecateFunc",
12-
"require",
13-
"equal",
14-
"asyncTest",
15-
"test",
16-
"raises",
17-
"deepEqual",
18-
"start",
19-
"stop",
20-
"ok",
21-
"strictEqual",
22-
"module",
23-
"expect",
24-
"minispade",
25-
"async",
26-
"invokeAsync"
27-
],
28-
29-
"node" : false,
30-
"browser" : true,
31-
32-
"boss" : true,
33-
"curly": false,
34-
"debug": false,
35-
"devel": false,
36-
"eqeqeq": true,
37-
"evil": true,
38-
"forin": false,
39-
"immed": false,
40-
"laxbreak": false,
41-
"newcap": true,
42-
"noarg": true,
43-
"noempty": false,
44-
"nonew": false,
45-
"nomen": false,
46-
"onevar": false,
47-
"plusplus": false,
48-
"regexp": false,
49-
"undef": true,
50-
"sub": true,
51-
"esnext": true,
52-
"strict": false,
53-
"white": false
2+
"predef": [
3+
"document",
4+
"window",
5+
"-Promise"
6+
],
7+
"browser": true,
8+
"boss": true,
9+
"curly": true,
10+
"debug": false,
11+
"devel": true,
12+
"eqeqeq": true,
13+
"evil": true,
14+
"forin": false,
15+
"immed": false,
16+
"laxbreak": false,
17+
"newcap": true,
18+
"noarg": true,
19+
"noempty": false,
20+
"nonew": false,
21+
"nomen": false,
22+
"onevar": false,
23+
"plusplus": false,
24+
"regexp": false,
25+
"undef": true,
26+
"sub": true,
27+
"strict": false,
28+
"white": false,
29+
"eqnull": true,
30+
"esnext": true,
31+
"unused": true
5432
}

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ cache:
77
directories:
88
- node_modules
99

10+
before_install:
11+
- "npm config set spin false"
12+
- "npm install -g npm@^2"
13+
1014
install:
1115
- npm install -g bower
1216
- npm install

Brocfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* jshint node: true */
12
/* global require, module */
23

34
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

LICENSE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bower.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "ember-validations",
33
"dependencies": {
4-
"handlebars": "~1.3.0",
4+
"handlebars": "~2.0.0",
55
"jquery": "^1.11.1",
6-
"ember": "1.7.0",
7-
"ember-data": "1.0.0-beta.10",
6+
"ember": "1.9.0",
7+
"ember-data": "1.0.0-beta.12",
88
"ember-resolver": "~0.1.10",
99
"loader.js": "stefanpenner/loader.js#1.0.1",
1010
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* jshint node: true */
2+
'use strict';
3+
14
module.exports = {
25
name: 'ember-validations'
36
};

package.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@
1818
"author": "",
1919
"license": "MIT",
2020
"devDependencies": {
21-
"body-parser": "^1.2.0",
22-
"broccoli-asset-rev": "0.3.0",
21+
"broccoli-asset-rev": "^1.0.0",
2322
"broccoli-ember-hbs-template-compiler": "^1.6.1",
24-
"ember-cli": "0.1.0",
25-
"ember-cli-content-security-policy": "0.2.0",
23+
"ember-cli": "0.1.4",
24+
"ember-cli-content-security-policy": "0.3.0",
25+
"ember-cli-dependency-checker": "0.0.6",
26+
"ember-cli-esnext": "0.1.1",
2627
"ember-cli-ic-ajax": "0.1.1",
27-
"ember-cli-inject-live-reload": "^1.2.2",
28-
"ember-cli-qunit": "0.1.0",
29-
"ember-data": "1.0.0-beta.10",
28+
"ember-cli-inject-live-reload": "^1.3.0",
29+
"ember-cli-qunit": "0.1.2",
30+
"ember-data": "1.0.0-beta.12",
31+
"ember-export-application-global": "^1.0.0",
3032
"express": "^4.8.5",
3133
"glob": "^4.0.5"
3234
},
@@ -36,4 +38,4 @@
3638
"ember-addon": {
3739
"configPath": "tests/dummy/config"
3840
}
39-
}
41+
}

tests/dummy/app/index.html

+6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111

1212
<link rel="stylesheet" href="assets/vendor.css">
1313
<link rel="stylesheet" href="assets/dummy.css">
14+
15+
{{content-for 'head-footer'}}
1416
</head>
1517
<body>
18+
{{content-for 'body'}}
19+
1620
<script src="assets/vendor.js"></script>
1721
<script src="assets/dummy.js"></script>
22+
23+
{{content-for 'body-footer'}}
1824
</body>
1925
</html>

tests/dummy/config/environment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = function(environment) {
3131
if (environment === 'test') {
3232
// Testem prefers this...
3333
ENV.baseURL = '/';
34-
ENV.locationType = 'auto';
34+
ENV.locationType = 'none';
3535

3636
// keep test console output quieter
3737
ENV.APP.LOG_ACTIVE_GENERATION = false;

tests/dummy/public/robots.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# robotstxt.org/
2-
1+
# http://www.robotstxt.org
32
User-agent: *

tests/helpers/start-app.js

-6
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@ export default function startApp(attrs) {
99
var attributes = Ember.merge({}, config.APP);
1010
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
1111

12-
Router.reopen({
13-
location: 'none'
14-
});
15-
1612
Ember.run(function() {
1713
App = Application.create(attributes);
1814
App.setupForTesting();
1915
App.injectTestHelpers();
2016
});
2117

22-
App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
23-
2418
return App;
2519
}

tests/index.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

1010
{{content-for 'head'}}
11+
{{content-for 'test-head'}}
1112

1213
<link rel="stylesheet" href="assets/vendor.css">
1314
<link rel="stylesheet" href="assets/dummy.css">
@@ -28,15 +29,21 @@
2829
zoom: 50%;
2930
}
3031
</style>
32+
33+
{{content-for 'head-footer'}}
34+
{{content-for 'test-head-footer'}}
3135
</head>
3236
<body>
33-
<div id="qunit"></div>
34-
<div id="qunit-fixture"></div>
3537

38+
{{content-for 'body'}}
39+
{{content-for 'test-body'}}
3640
<script src="assets/vendor.js"></script>
3741
<script src="assets/test-support.js"></script>
3842
<script src="assets/dummy.js"></script>
3943
<script src="testem.js"></script>
4044
<script src="assets/test-loader.js"></script>
45+
46+
{{content-for 'body-footer'}}
47+
{{content-for 'test-body-footer'}}
4148
</body>
4249
</html>

0 commit comments

Comments
 (0)