#NEWLINE# def test_casting_spell_uses_spirit( self ) : #NEWLINE# #INDENT# '\n        Casting a spell should use spirit energy\n        ' #NEWLINE# spell = SpellBuilder ( ) . with_spirit ( 10 ) . build ( ) #NEWLINE# caster = CharacterBuilder ( ) . with_spirit ( 20 ) . build ( ) #NEWLINE# effects_factory = mock ( ) #NEWLINE# dying_rules = mock ( ) #NEWLINE# action = SpellCastingAction ( caster = caster , spell = spell , effects_factory = effects_factory , dying_rules = dying_rules ) #NEWLINE# action . execute ( ) #NEWLINE# assert_that ( caster . spirit , is_ ( equal_to ( 10 ) ) )