@chamankang you can refer to https://github.com/cloudware-cookbooks/ktc-utils/blob/master/spec/patch_spec.rb.