# File actionpack/lib/action_controller/assertions.rb, line 58def assert_response(type,message=nil)clean_backtracedoif[:success,:missing,:redirect,:error].include?(type)&&@response.send("#{type}?")assert_block(""){true}# to count the assertionelsiftype.is_a?(Fixnum)&&@response.response_code==typeassert_block(""){true}# to count the assertionelseassert_block(build_message(message,"Expected response to be a <?>, but was <?>",type,@response.response_code)){false}endendend