Skip to content

Instantly share code, notes, and snippets.

@lightsofapollo
Created March 8, 2012 02:16
Show Gist options
  • Save lightsofapollo/1998107 to your computer and use it in GitHub Desktop.
Save lightsofapollo/1998107 to your computer and use it in GitHub Desktop.
lets for javascript tests??
var SubjectClass = require('subject-class');
describe("NewLets", function(){
var subject;
stage('subject', function(){
subject = new SubjectClass;
});
it("should be a subject", function(){
expect(subject).to.be.a(SubjectClass);
});
describe("Nested", function(){
stage('subject', function(){
subject = new SubjectClass({isFoo: true});
});
it('should have isFoo', function(){
expect(subject.isFoo).to.be(true);
});
});
});
@lightsofapollo
Copy link
Author

Note that the intent is so the "Nested" describe will call stage('subject') only once the higher level stage will not be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment