SIMULATE A NOT FOUND RESOURCE RESOURCE.STUB(:WHERE).WITH(:CREATED_FROM => PARAMS[:ID]).AND_RETURN(FALSE) BEFORE(:EACH) DO END ... IT { SHOULD RESPOND_WITH 404 } END sábado, 15 de setembro de 12
MATCH /RESOURCE NAME/ } IT{ASSIGNS("MESSAGE").SHOULD MATCH /BORN IN CRATO/} IT{ASSIGNS("MESSAGE").CREATOR.SHOULD MATCH /ERNEST/ IT { SHOULD MATCH /BORN IN CRATO/} IT { SHOULD MATCH /BORN IN CRATO/} sábado, 15 de setembro de 12
MATCH /RESOURCE NAME/ } IT{ASSIGNS("MESSAGE").SHOULD MATCH /BORN IN CRATO/} IT{ASSIGNS("MESSAGE").CREATOR.SHOULD MATCH /ERNEST/ IT { SHOULD MATCH /BORN IN CRATO/} IT { SHOULD MATCH /BORN IN CRATO/} sábado, 15 de setembro de 12
DEF DO_ACTION(OPTIONS = {}) ATTRIBUTES = {:NAME => "RESOURCE NAME", :SCOPE => "EVEN.TC/SCOPE"} ATTRIBUTES.MERGE!(OPTIONS.SYMBOLIZE_KEYS!) POST :CREATE, ATTRIBUTES END sábado, 15 de setembro de 12
#WRONG IT "SHOULD CREATE A RESOURCE" DO IT { SHOULD ASSIGN_TO(:RESOURCE) } RESPONSE.SHOULD RESPOND_WITH_CONTENT_TYPE(:JSON) RESPONSE.SHOULD ASSIGN_TO(:RESOURCE) END sábado, 15 de setembro de 12