Rspec for uploading an image using yml file

In models/attach.rb

has_attached_file :file,
:styles => {:resized => “100x100>”, :iphone => “480x320>”, :ipad =>
“1024x768>”}, :storage => :s3, :s3_credentials =>
“#{Rails.root}/config/s3.yml”, :path =>
“:attachment/:id/:style.:extension”, :bucket =>
‘observation_caseronpromo’

I do not know how to write the rspec for uploading an image using
rails 3.1.3 version. The above codes are used to upload s7.yml file.
So please help me out.

Thanks in advance,
M.Dhiviya