silverstripe-framework/thirdparty/jquery-concrete/vendor/jspec/spec/spec.grammar-less.js
Ingo Schommer dca8c0cb6f merging
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:06 +00:00

34 lines
657 B
JavaScript

JSpec.describe('Grammar-less', function(){
before(function(){
n = 1
})
it('should work', function(){
expect(true).to(be, true)
expect(n).to(equal, 1)
})
describe('with nested describes', function(){
before(function(){
hits = []
})
before_each(function(){
n++
hits.push('before_each')
})
it('should work', function(){
expect(true).not_to(be, false)
expect(n).to(eql, 2)
expect(hits).to(eql, ['before_each'])
})
it('should work again', function(){
expect(n).to(eql, 3)
expect(hits).to(eql, ['before_each', 'before_each'])
})
})
})