Refactored create_spec.rb and added tests and validations