Commit 96f4b00b authored by Eloy Durán's avatar Eloy Durán

Make test Ruby 1.8.7 compatible.

See https://travis-ci.org/CocoaPods/CocoaPods/jobs/21842661
parent c264c399
......@@ -65,13 +65,16 @@ module Pod
config.sandbox.store_head_pod('BananaLib')
pod_folder = config.sandbox.root + 'BananaLib'
partially_downloaded_file = pod_folder + 'partially_downloaded_file'
mock_downloader = Object.new
mock_downloader.define_singleton_method(:download_head) do
singleton_class = class << mock_downloader; self; end
singleton_class.send(:define_method, :download_head) do
FileUtils.mkdir_p(pod_folder)
FileUtils.touch(partially_downloaded_file)
raise("some network error")
end
@installer.stubs(:downloader).returns(mock_downloader)
lambda {
@installer.install!
}.should.raise(RuntimeError).message.should.equal('some network error')
......
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