Sha256: ac1472e6f5c99f8d75373e008d4661c256c47fc465dba7fda0049900581612d3

Contents?: true

Size: 543 Bytes

Versions: 25

Compression:

Stored size: 543 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('http://0.0.0.0/test')
      end
      result.should == false
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
xcode-install-2.3.1 spec/curl_spec.rb
xcode-install-2.3.0 spec/curl_spec.rb
xcode-install-2.2.1 spec/curl_spec.rb
xcode-install-2.2.0 spec/curl_spec.rb
xcode-install-2.1.1 spec/curl_spec.rb
xcode-install-2.1.0 spec/curl_spec.rb
xcode-install-2.0.9 spec/curl_spec.rb
xcode-install-2.0.8 spec/curl_spec.rb
xcode-install-2.0.7 spec/curl_spec.rb
xcode-install-2.0.6 spec/curl_spec.rb
xcode-install-2.0.5 spec/curl_spec.rb
xcode-install-2.0.4 spec/curl_spec.rb
xcode-install-2.0.3 spec/curl_spec.rb
xcode-install-2.0.2 spec/curl_spec.rb
xcode-install-2.0.1 spec/curl_spec.rb
xcode-install-2.0.0 spec/curl_spec.rb
xcode-install-1.4.0 spec/curl_spec.rb
xcode-install-1.3.0 spec/curl_spec.rb
xcode-install-1.2.6 spec/curl_spec.rb
xcode-install-1.2.5 spec/curl_spec.rb