Skip to content

Instantly share code, notes, and snippets.

@ryanbahniuk
Last active August 29, 2015 14:23
Show Gist options
  • Save ryanbahniuk/3480b5c384436f8621fc to your computer and use it in GitHub Desktop.
Save ryanbahniuk/3480b5c384436f8621fc to your computer and use it in GitHub Desktop.
describe('_grid.scss', function() {
var gridColumns = 12;
var mixin;
var compiled;
var sassaby;
beforeEach(function() {
sassaby = new Sassaby('_grid.scss', {
variables: {
'grid-columns': gridColumns
}
});
});
describe('make-order', function() {
beforeEach(function() {
mixin = sassaby.standaloneMixin('make-order');
compiled = mixin.calledWithArgs('lg', 6);
});
it('should create the correct selector', function() {
compiled.createsSelector('.order-lg-6');
});
it('should make the correct declaration', function() {
compiled.declares('order', '5');
});
});
describe('make-specific-alignments', function() {
beforeEach(function() {
mixin = sassaby.standaloneMixin('make-specific-alignments');
compiled = mixin.calledWithArgs('lg');
});
it('should call the correct mixins', function() {
for(var i = 1; i <= gridColumns; i++) {
compiled.calls('make-order(lg, ' + i + ')');
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment