1
1
2
- describe ( 'Žebřík ' , function ( ) {
2
+ describe ( 'Ladder ' , function ( ) {
3
3
before ( function ( ) {
4
4
window . alert = sinon . stub ( window , "alert" ) ;
5
5
} ) ;
6
6
7
7
beforeEach ( function ( ) {
8
- žebřík . stupeň = 0 ;
8
+ ladder . step = 0 ;
9
9
} ) ;
10
10
11
- it ( 'nahoru () by mělo vrátit this' , function ( ) {
12
- assert . equal ( žebřík . nahoru ( ) , žebřík ) ;
11
+ it ( 'up () should return this' , function ( ) {
12
+ assert . equal ( ladder . up ( ) , ladder ) ;
13
13
} ) ;
14
14
15
- it ( 'dolů () by mělo vrátit this' , function ( ) {
16
- assert . equal ( žebřík . dolů ( ) , žebřík ) ;
15
+ it ( 'down () should return this' , function ( ) {
16
+ assert . equal ( ladder . down ( ) , ladder ) ;
17
17
} ) ;
18
18
19
- it ( 'zobrazStupeň () by mělo volat alert' , function ( ) {
20
- žebřík . zobrazStupeň ( ) ;
19
+ it ( 'showStep () should call alert' , function ( ) {
20
+ ladder . showStep ( ) ;
21
21
assert ( alert . called ) ;
22
22
} ) ;
23
23
24
- it ( 'nahoru () by mělo zvýšit stupeň ' , function ( ) {
25
- assert . equal ( žebřík . nahoru ( ) . nahoru ( ) . stupeň , 2 ) ;
24
+ it ( 'up () should increase step ' , function ( ) {
25
+ assert . equal ( ladder . up ( ) . up ( ) . step , 2 ) ;
26
26
} ) ;
27
27
28
- it ( 'dolů () by mělo snížit stupeň ' , function ( ) {
29
- assert . equal ( žebřík . dolů ( ) . stupeň , - 1 ) ;
28
+ it ( 'down () should decrease step ' , function ( ) {
29
+ assert . equal ( ladder . down ( ) . step , - 1 ) ;
30
30
} ) ;
31
31
32
- it ( 'dolů ().nahoru ().nahoru ().nahoru () ' , function ( ) {
33
- assert . equal ( žebřík . dolů ( ) . nahoru ( ) . nahoru ( ) . nahoru ( ) . stupeň , 2 ) ;
32
+ it ( 'down ().up ().up ().up () ' , function ( ) {
33
+ assert . equal ( ladder . down ( ) . up ( ) . up ( ) . up ( ) . step , 2 ) ;
34
34
} ) ;
35
35
36
36
it ( 'showStep() should return this' , function ( ) {
@@ -42,7 +42,7 @@ describe('Žebřík', function() {
42
42
} ) ;
43
43
44
44
after ( function ( ) {
45
- žebřík . stupeň = 0 ;
45
+ ladder . step = 0 ;
46
46
alert . restore ( ) ;
47
47
} ) ;
48
48
} ) ;
0 commit comments