Skip to content

Instantly share code, notes, and snippets.

@monokrome monokrome/example_spec.coffee Secret
Last active Aug 29, 2015

Embed
What would you like to do?
describeDirective '<section data-example>', ->
inject 'services.user'
# Get this in context as 'ex'
inject 'services.exampleService', 'ex'
it 'should default to the enabled state', ->
# Can use @user and @ex now
assert.equal @scope.enabled, yes
describeDirective('<section data-example>', function() {
inject('services.user');
// Get this in context as 'ex'
inject('services.exampleService', 'ex');
it('should default to the enabled state', function() {
// Can use this.user and this.ex here now
assert.equal(this.scope.enabled, true);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.