public
Fork of tobowers/screw-unit
Description: A Javascript BDD Framework with nested describes, a convenient assertion syntax, and an intuitive test browser. - this fork is an attempt to add stubbing and mocking in the rspec style
Homepage:
Clone URL: git://github.com/trotter/screw-unit.git
Peeja (author)
Tue Apr 21 15:18:04 -0700 2009
commit  5a18badee9c78ce264025d1cf0c1084f2f1709fe
tree    ccd9447b42678e27f9b8d359229e2da1c323663d
parent  93b49fbf167f4feeb909368ab5cc2f9549089e9a
screw-unit / spec / skipping_spec.js
100644 38 lines (27 sloc) 0.99 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Screw.Unit(function() {
  
  describe('Skipping Tests', function() {
    it( 'should skip this test. ', function(me){
      skip(me).because('skipping needs to be tested');
      alert('you should not see this!');
    });
    
    it( 'should skip this test in the asynchronous part ', function(me){
      using(me).wait(2).and_then(function(){
        skip(me).because('skipping in ansychronous functions needs to be tested');
      });
    });
    
    describe('Skipping Tests In Groups', function() {
 
      before(function(me){
        skip(me).because('skipping in the before prevents these tests from being executed at all');
      });
      
      it( 'should not fail ', function(me){
        throw "an error";
      });
      
      it( 'should not succeed ', function(me){
        expect(true).to(be_true);
      });
 
      it( 'should not execute - no alert should be shown ', function(me){
        alert('you should never see this alert');
      });
 
    });
    
  });
  
});