2014-03-07 10:47:50 -07:00
/* jasmine specs for primitives/LooksPrims.js go here */
2014-03-10 21:04:56 -06:00
describe ( 'LooksPrims' , function ( ) {
2014-04-09 01:18:14 -07:00
var looksPrims , targetSpriteMock ;
2014-03-07 10:47:50 -07:00
beforeEach ( function ( ) {
2014-04-09 01:18:14 -07:00
looksPrims = LooksPrims ;
targetSpriteMock = targetMock ( ) ;
2014-03-07 10:47:50 -07:00
} ) ;
2014-03-08 00:46:59 -07:00
2014-04-09 01:18:14 -07:00
describe ( 'showBubble for say' , function ( ) {
var sayBlock ;
beforeEach ( function ( ) {
sayBlock = { 'args' : [ 'what to say' ] } ;
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : sayBlock } ) ;
} ) ;
2014-03-08 00:46:59 -07:00
2014-04-09 01:18:14 -07:00
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
spyOn ( targetSpriteMock , "showBubble" ) ;
showBubble ( sayBlock , "say" ) ;
expect ( targetSpriteMock . showBubble ) . toHaveBeenCalledWith ( { args : [ 'what to say' ] } , 'say' ) ;
} ) ;
2014-03-08 00:46:59 -07:00
} ) ;
2014-04-09 01:18:14 -07:00
describe ( 'showBubble for think' , function ( ) {
var thinkBlock ;
beforeEach ( function ( ) {
thinkBlock = { 'args' : [ 'what to think' ] } ;
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : thinkBlock } ) ;
} ) ;
2014-03-08 00:46:59 -07:00
2014-04-09 01:18:14 -07:00
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
spyOn ( targetSpriteMock , "showBubble" ) ;
showBubble ( thinkBlock , "think" ) ;
expect ( targetSpriteMock . showBubble ) . toHaveBeenCalledWith ( { args : [ 'what to think' ] } , 'think' ) ;
} ) ;
2014-03-08 00:46:59 -07:00
} ) ;
2014-04-09 01:18:14 -07:00
describe ( 'showBubble for ask' , function ( ) {
var askBlock ;
beforeEach ( function ( ) {
askBlock = { 'args' : [ 'what to ask' ] } ;
interp = interpreterMock ( { 'targetSprite' : targetSpriteMock } , { 'arg' : askBlock } ) ;
} ) ;
it ( 'should call the showBubble method on the targetedSprite' , function ( ) {
spyOn ( targetSpriteMock , "showBubble" ) ;
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
} ) ;