@@ -16,7 +16,7 @@ Mammal.prototype = {
1616
1717test ( "defining a 'class'" , function ( ) {
1818 var eric = new Mammal ( "Eric" ) ;
19- equal ( __ , eric . sayHi ( ) , 'what will Eric say?' ) ;
19+ equal ( "Hello, my name is Eric" , eric . sayHi ( ) , 'what will Eric say?' ) ;
2020} ) ;
2121
2222// add another function to the Mammal 'type' that uses the sayHi function
@@ -26,7 +26,7 @@ Mammal.prototype.favouriteSaying = function() {
2626
2727test ( "more functions" , function ( ) {
2828 var bobby = new Mammal ( "Bobby" ) ;
29- equal ( __ , bobby . favouriteSaying ( ) , "what is Bobby's favourite saying?" ) ;
29+ equal ( "Bobby's favourite saying is Hello, my name is Bobby" , bobby . favouriteSaying ( ) , "what is Bobby's favourite saying?" ) ;
3030} ) ;
3131
3232test ( "calling functions added to a prototype after an object was created" , function ( ) {
@@ -36,7 +36,7 @@ test("calling functions added to a prototype after an object was created", funct
3636 } ;
3737 // the following statement asks the paul object to call a function that was added
3838 // to the Mammal prototype after paul was constructed.
39- equal ( __ , paul . numberOfLettersInName ( ) , "how long is Paul's name?" ) ;
39+ equal ( 4 , paul . numberOfLettersInName ( ) , "how long is Paul's name?" ) ;
4040} ) ;
4141
4242// helper function for inheritance.
@@ -56,6 +56,6 @@ extend(Bat, Mammal);
5656
5757test ( "Inheritance" , function ( ) {
5858 var lenny = new Bat ( "Lenny" , "1.5m" ) ;
59- equal ( __ , lenny . sayHi ( ) , "what does Lenny say?" ) ;
60- equal ( __ , lenny . wingspan , "what is Lenny's wingspan?" ) ;
59+ equal ( "Hello, my name is Lenny" , lenny . sayHi ( ) , "what does Lenny say?" ) ;
60+ equal ( "1.5m" , lenny . wingspan , "what is Lenny's wingspan?" ) ;
6161} ) ;
0 commit comments