2014-03-07 10:47:50 -07:00
/* jasmine specs for primitives/LooksPrims.js go here */
describe ( 'LooksPrims' , function ( ) {
2014-03-08 00:46:59 -07:00
var looksPrims , targetSpriteMock ;
2014-03-07 10:47:50 -07:00
beforeEach ( function ( ) {
looksPrims = LooksPrims ;
2014-03-08 00:46:59 -07:00
targetSpriteMock = targetMock ( ) ;
2014-03-07 10:47:50 -07:00
} ) ;
2014-03-08 00:46:59 -07:00
describe ( 'showBubble for Say' , function ( ) {
var sayBlock ;
2014-03-07 10:47:50 -07:00
beforeEach ( function ( ) {
sayBlock = { 'args' : [ 'what to say' ] } ;
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : sayBlock } ) ;
} ) ;
2014-03-08 00:46:59 -07:00
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
2014-03-07 10:47:50 -07:00
spyOn ( targetSpriteMock , "showBubble" ) ;
showBubble ( sayBlock , "say" ) ;
2014-03-09 11:59:38 -06:00
expect ( targetSpriteMock . showBubble ) . toHaveBeenCalledWith ( { args : [ 'what to say' ] } , 'say' ) ;
2014-03-07 10:47:50 -07:00
} ) ;
} ) ;
2014-03-08 00:46:59 -07:00
describe ( 'showBubble for Think' , function ( ) {
var thinkBlock ;
beforeEach ( function ( ) {
thinkBlock = { 'args' : [ 'what to think' ] } ;
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : thinkBlock } ) ;
} ) ;
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
spyOn ( targetSpriteMock , "showBubble" ) ;
showBubble ( thinkBlock , "think" ) ;
2014-03-09 11:59:38 -06:00
expect ( targetSpriteMock . showBubble ) . toHaveBeenCalledWith ( { args : [ 'what to think' ] } , 'think' ) ;
2014-03-08 00:46:59 -07:00
} ) ;
} ) ;
describe ( 'showBubble for Ask' , function ( ) {
var askBlock ;
beforeEach ( function ( ) {
2014-03-09 11:59:38 -06:00
askBlock = { 'args' : [ 'what to ask' ] } ;
2014-03-08 00:46:59 -07:00
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : askBlock } ) ;
} ) ;
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
spyOn ( targetSpriteMock , "showBubble" ) ;
2014-03-09 11:59:38 -06:00
showBubble ( askBlock , "ask" ) ;
expect ( targetSpriteMock . showBubble ) . toHaveBeenCalledWith ( { args : [ 'what to ask' ] } , 'ask' ) ;
2014-03-08 00:46:59 -07:00
} ) ;
} ) ;
2014-03-07 10:47:50 -07:00
} ) ;