Skip to content

Instantly share code, notes, and snippets.

@appleton
Last active August 29, 2015 14:07
Show Gist options
  • Save appleton/774d7e54351fd33789bb to your computer and use it in GitHub Desktop.
Save appleton/774d7e54351fd33789bb to your computer and use it in GitHub Desktop.
describe('A test', function() {
set('data', function() {
return { some: 'stuff' };
});
set('subject', function() {
return new FooThing(data);
});
it('does stuff', function() {
expect(subject.method()).toBe('whatever');
});
});
describe('A test', function() {
var subject;
var data;
beforeEach(function() {
data = {
some: 'stuff'
};
subject = new FooThing(data);
});
afterEach(function() {
data = null;
subject = null;
});
it('does stuff', function() {
expect(subject.method()).toBe('whatever');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment