fixed spec for undefined namespace
updated to generate custom namespace when it is not specified
fixed specs