Sha256: cd542e57a51976589cd88604d9f262e7648b7e31b8608a6ad11ed84c23f2e2bd
Contents?: true
Size: 554 Bytes
Versions: 1
Compression:
Stored size: 554 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe GH::Response do 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 pending if RUBY_ENGINE == 'jruby' # see https://github.com/flori/json/issues/138 GH::Response.new({}, "{\"foo\":\"\xC3\"}")["foo"].should be == "\xC3" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gh-0.6.1 | spec/response_spec.rb |