Sha256: d394f5e110304867ff0302697659f0d6e3caade8e20f3c2add1d051a48df44f9
Contents?: true
Size: 562 Bytes
Versions: 8
Compression:
Stored size: 562 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe GH::Response do it 'parses content endpoints correctly' do GH['/repos/rkh/gh/contents/README.md'] end it 'handles UTF-8 properly, even if encoded binary' do raw = '{"foo":"über cool sista året"}' raw.force_encoding 'binary' if raw.respond_to? :force_encoding response = GH::Response.new(raw) response['foo'].should be == 'über cool sista året' end # it 'handles broken encodings properly' do # GH::Response.new("{\"foo\":\"\xC3\"}")["foo"].should be == "\xC3" # end end
Version data entries
8 entries across 8 versions & 1 rubygems