Skip to content

Instantly share code, notes, and snippets.

@rianby64
Last active January 14, 2016 19:34
Show Gist options
  • Save rianby64/eaa4c899c2e41a143b7a to your computer and use it in GitHub Desktop.
Save rianby64/eaa4c899c2e41a143b7a to your computer and use it in GitHub Desktop.
Apolog loader for Jasmine
'use strict'
var apolog = require('apolog'),
fs = require('fs'),
_loadFeature = apolog.loadFeature;
global.feature = apolog.feature;
global.scenario = apolog.scenario;
global.background = apolog.background;
global.given = apolog.given;
global.when = apolog.when;
global.then = apolog.then;
global.step = apolog.step;
global.and = apolog.and;
global.but = apolog.but;
global.run = apolog.run;
global.loadFeature = function(feature) {
_loadFeature(fs.readFileSync(feature, 'utf8'), {
path: feature
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment