forked from acuminous/yadda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunctionalTests.js
37 lines (30 loc) · 1.2 KB
/
FunctionalTests.js
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
/* jslint node: true */
/* global describe, it, beforeEach */
"use strict";
var hospital = require('./lib/hospital');
var Yadda = require('../lib/index').Yadda;
describe('Hospital', function() {
var yadda;
beforeEach(function() {
var library = require('./lib/hospital-steps').init();
yadda = new Yadda(library);
});
it('should admit an on template patient', function() {
yadda.yadda([
'Given that Bob Holness is a male, cardiovascular patient at Heathroad hospital',
'and that Holbrook ward is a cardiovascular ward in Heathroad hospital',
'and that bed 209 is a male bed in Holbrook ward',
'when Bob is admitted to bed 209',
'then he is marked as on template'
]);
});
it('should admit an off template patient', function() {
yadda.yadda([
'Given that Bob Holness is a male, cardiovascular patient at Heathroad hospital',
'and that Bucklesham ward is a respiratory ward in Heathroad hospital',
'and that bed 209 is a male bed in Bucklesham ward',
'when Bob is admitted to bed 209',
'then he is marked as off template'
]);
});
});