forked from MindscapeHQ/ember-cli-raygun
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathember-cli-raygun-test.js
More file actions
45 lines (34 loc) · 1.35 KB
/
ember-cli-raygun-test.js
File metadata and controls
45 lines (34 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* eslint-env node */
/* global describe, it */
'use strict';
const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');
const file = require('ember-cli-blueprint-test-helpers/chai').file;
const expect = require('ember-cli-blueprint-test-helpers/chai').expect;
const setupTestHooks = blueprintHelpers.setupTestHooks;
const emberNew = blueprintHelpers.emberNew;
const emberGenerate = blueprintHelpers.emberGenerate;
describe('Acceptance: ember generate ember-cli-raygun', function() {
setupTestHooks(this);
it('ember-cli-raygun with api key passed in', function() {
let args = ['ember-cli-raygun', '--api_key=FACEYFACEFACE'];
// pass any additional command line options in the arguments array
return emberNew()
.then(() => emberGenerate(args))
.then(() =>
expect(file('config/environment.js')).to.contain(` raygun: {
apiKey: "FACEYFACEFACE",
enabled: (environment === "production")
},`))
});
it('ember-cli-raygun without api key', function() {
let args = ['ember-cli-raygun'];
// pass any additional command line options in the arguments array
return emberNew()
.then(() => emberGenerate(args))
.then(() =>
expect(file('config/environment.js')).to.contain(` raygun: {
apiKey: "YOUR-RAYGUN-API-KEY",
enabled: (environment === "production")
},`))
});
});