I tried to write rspec for one of my remote_file resource. But I am unsuccessful to make it.
My concept is using remote_file it should download a remote file which is a zip file. What happen is rspec is expecting more after It downloaded remotely.
This is my resource declaration:
remote_file zip_file_location do
source http://google.com
mode '0754'
action :create
end
This is my rspec test:
it 'creates a remote_file ' do
expect(chef_run).to create_remote_file(::File.join(Chef::Config[:file_cache_path], 'sonarqube-5.6.6.zip'))
end