Permalink
Browse files

given invoker with up command -red

  • Loading branch information...
ferclaverino committed Dec 4, 2016
1 parent 7af4ff5 commit 3bade6fb73833b201b0948caff16ecbad427c5d8
Showing with 45 additions and 0 deletions.
  1. +8 −0 manual/invoker.js
  2. +26 −0 spec/invoker.spec.js
  3. +11 −0 spec/support/jasmine.json
@@ -0,0 +1,8 @@
class Invoker {
start() {
}
}
module.exports = Invoker;
@@ -0,0 +1,26 @@
const Invoker = require('../manual/invoker.js');
describe('invoker', ()=> {
describe('given invoker with up command', ()=> {
var invoker;
var upCommand;
beforeEach(() => {
upCommand = {
start: () => {}
};
spyOn(upCommand, 'start');
invoker = new Invoker({
up: upCommand
});
});
describe('when start up', ()=> {
beforeEach(() => invoker.start('up'));
it('then start up command is called', ()=> {
expect(upCommand.start).toHaveBeenCalled();
});
});
});
});
@@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

0 comments on commit 3bade6f

Please sign in to comment.