public
Fork of nathansobo/screw-unit
Description: A Javascript BDD Framework with nested describes, a convenient assertion syntax, and an intuitive test browser.
Clone URL: git://github.com/nkallen/screw-unit.git
Search Repo:
Click here to lend your support to: screw-unit and make a donation at www.pledgie.com !
Ignoring Intellij Idea files. Adding Screw.Assets, which adds the require 
and stylesheet methods.
btakita (author)
Sun Apr 27 04:01:08 -0700 2008
commit  3916fe3b49257cbaafc00a61e9f7aa658a9e273e
tree    14a21a88e5675afb2a98678a759a41d19fddd48f
parent  dfbfdb4d8cb1268e4b203ecbb695fd210d969a0e
...
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
 
 
113
114
115
...
6
7
8
 
9
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
12
13
14
15
0
@@ -6,110 +6,10 @@
0
     <script src="../lib/screw.builder.js"></script>
0
     <script src="../lib/screw.events.js"></script>
0
     <script src="../lib/screw.behaviors.js"></script>
0
- <link rel="stylesheet" href="../lib/screw.css">
0
+ <script src="../lib/screw.assets.js"></script>
0
     <script type="text/javascript">
0
- Screw.Unit(function() {
0
- describe('Screw.Unit', function() {
0
- describe("Matchers", function() {
0
- it("invokes the provided matcher on a call to expect", function() {
0
- expect(true).to(equal, true);
0
- expect(true).to_not(equal, false);
0
- });
0
-
0
- it("equal matches Arrays with the same elements", function() {
0
- expect([1, 2, 4]).to(equal, [1, 2, 3]);
0
- expect([1, 2, 3]).to_not(equal, [3, 2, 1]);
0
- });
0
- });
0
-
0
- describe('#run', function() {
0
- describe("A describe with a before block", function() {
0
- var before_invoked = false;
0
- before(function() {
0
- before_invoked = true;
0
- });
0
-
0
- it("invokes the before prior to an it", function() {
0
- expect(before_invoked).to(equal, true);
0
- before_invoked = false;
0
- });
0
-
0
- it("invokes the before prior to each it", function() {
0
- expect(before_invoked).to(equal, true);
0
- });
0
- });
0
-
0
- describe("A describe with two before blocks", function() {
0
- var invocations = [];
0
- before(function() {
0
- invocations.push('before 1');
0
- });
0
-
0
- before(function() {
0
- invocations.push('before 2');
0
- });
0
-
0
- it("invokes the befores in lexical order prior to each it", function() {
0
- expect(invocations).to(equal, ['before 1', 'before 2']);
0
- });
0
- });
0
-
0
- describe("A describe with a nested describe", function() {
0
- var invocations = [];
0
- before(function() {
0
- invocations = [];
0
- invocations.push("outermost before");
0
- });
0
-
0
- it("after a nested describe, does not invoke any of its befores", function() {
0
- expect(invocations).to(equal, ["outermost before"]);
0
- });
0
-
0
- describe("a nested describe", function() {
0
- before(function() {
0
- invocations.push("inner before");
0
- });
0
-
0
- describe("a doubly nested describe", function() {
0
- before(function() {
0
- invocations.push('innermost before');
0
- })
0
-
0
- it("runs befores in all ancestors prior to an it", function() {
0
- expect(invocations).to(equal, ["outermost before", "inner before", "innermost before"]);
0
- });
0
-
0
- it("runs befores in all ancestors prior to each it", function() {
0
- expect(invocations).to(equal, ["outermost before", "inner before", "innermost before"]);
0
- });
0
- });
0
-
0
- it("runs a before in the parent describe before each it", function() {
0
- expect(invocations).to(equal, ["outermost before", "inner before"]);
0
- });
0
- });
0
- });
0
- });
0
-
0
- describe("#selector", function() {
0
- describe('a describe', function() {
0
- it('returns a css selector that uniquely locates the describe', function() {
0
- $('.describe').each(function() {
0
- expect($($(this).fn('selector')).get(0)).to(equal, $(this).get(0))
0
- });
0
- });
0
- });
0
-
0
- describe('an it', function() {
0
- it('returns a css selector that uniquely locates the it', function() {
0
- $('.it').each(function() {
0
- expect($($(this).fn('selector')).get(0)).to(equal, $(this).get(0))
0
- });
0
- });
0
- });
0
- });
0
- });
0
- });
0
+ stylesheet("../lib/screw");
0
+ require("screwunit_spec");
0
     </script>
0
   </head>
0
   <body></body>

Comments

    No one has commented yet.