solution 1 is correct and i am giving you second example which will retrun same result
select routine_definition
from INFORMATION_SCHEMA.routines
where specific_catalog = 'databaseName'
and specific_schema = 'dbo'
and routine_type = 'Procedure'
and routine_name = 'ProcedureName'
in solution 1 it will give you many row as long as storeprocedure but in this solution it will return you only one row.
now i am giving you a another query which will return same result.
select definition
from sys.sql_modules
where object_id = object_id('databaseName.dbo.ProcedureName')