Commit 50bec6b4 authored by Eloy Durán's avatar Eloy Durán

Rewrite a spec that expects a certain error to be raised.

parent aa5d2114
...@@ -19,7 +19,6 @@ describe Pod::Downloader::Http do ...@@ -19,7 +19,6 @@ describe Pod::Downloader::Http do
downloader.should.be.instance_of Pod::Downloader::Http downloader.should.be.instance_of Pod::Downloader::Http
downloader.type.should == :zip downloader.type.should == :zip
downloader = Pod::Downloader.for_pod(stub_pod_with_source( downloader = Pod::Downloader.for_pod(stub_pod_with_source(
:http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0.tar' :http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0.tar'
)) ))
...@@ -69,20 +68,21 @@ describe Pod::Downloader::Http do ...@@ -69,20 +68,21 @@ describe Pod::Downloader::Http do
downloader.download downloader.download
end end
it 'should raise error when unsupported filetype is pass' do it 'should raise error when unsupported filetype is passed' do
downloader = Pod::Downloader.for_pod(stub_pod_with_source( should.raise Pod::Downloader::Http::UnsupportedFileTypeError do
:http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0.rar' downloader = Pod::Downloader.for_pod(stub_pod_with_source(
)) :http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0.rar'
downloader.expects(:download).raises(Pod::Downloader::Http::UnsupportedFileTypeError) ))
downloader.download rescue nil downloader.download
end
downloader = Pod::Downloader.for_pod(stub_pod_with_source(
:http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0', should.raise Pod::Downloader::Http::UnsupportedFileTypeError do
:type => :rar downloader = Pod::Downloader.for_pod(stub_pod_with_source(
)) :http => 'https://testflightapp.com/media/sdk-downloads/TestFlightSDK1.0',
downloader.expects(:download).raises(Pod::Downloader::Http::UnsupportedFileTypeError) :type => :rar
downloader.download rescue nil ))
downloader.download
end
end end
it 'should move unpacked contents to parent dir when archive contains only a folder (#727)' do it 'should move unpacked contents to parent dir when archive contains only a folder (#727)' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment