Sha256: 5871a6e37f8f21af3edf25285a3a97aed2dfa357765d17f1495377837e9745ae

Contents?: true

Size: 548 Bytes

Versions: 18

Compression:

Stored size: 548 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)

module XcodeInstall
  def self.silence_stderr
    begin
      orig_stderr = $stderr.clone
      $stderr.reopen File.new('/dev/null', 'w')
      retval = yield
    ensure
      $stderr.reopen orig_stderr
    end
    retval
  end

  describe Curl do
    it 'reports failure' do
      `true`
      curl = XcodeInstall::Curl.new
      result = nil
      XcodeInstall.silence_stderr do
        result = curl.fetch(url: 'http://0.0.0.0/test')
      end
      result.should == false
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
xcode-install-2.8.1 spec/curl_spec.rb
xcode-install-2.8.0 spec/curl_spec.rb
xcode-install-2.7.0 spec/curl_spec.rb
xcode-install-2.6.8 spec/curl_spec.rb
xcode-install-2.6.7 spec/curl_spec.rb
xcode-install-2.6.6 spec/curl_spec.rb
xcode-install-2.6.5 spec/curl_spec.rb
xcode-install-2.6.4 spec/curl_spec.rb
xcode-install-2.6.3 spec/curl_spec.rb
xcode-install-2.6.2 spec/curl_spec.rb
xcode-install-2.6.1 spec/curl_spec.rb
xcode-install-2.6.0 spec/curl_spec.rb
xcode-install-citrus-2.5.0 spec/curl_spec.rb
xcode-install-2.5.0 spec/curl_spec.rb
xcode-install-2.4.4 spec/curl_spec.rb
xcode-install-2.4.2 spec/curl_spec.rb
xcode-install-2.4.1 spec/curl_spec.rb
xcode-install-2.4.0 spec/curl_spec.rb