Skip to content

Instantly share code, notes, and snippets.

@stalniy
Created June 25, 2018 18:32
Show Gist options
  • Save stalniy/7c07434113c4b00f7dbf2544c093ac74 to your computer and use it in GitHub Desktop.
Save stalniy/7c07434113c4b00f7dbf2544c093ac74 to your computer and use it in GitHub Desktop.
Lazy vars include shared validator
describe('Issue', function() {
subject(function() {
return new Issue();
});
def('min', function() {
return $subject.getMinPriority();
});
def('max', function() {
return $subject.getMaxPriority();
});
describe('"Priority" field', function() {
includeExamplesFor('Range validator', 'priority', get.variable('min'), get.variable('max'));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment