Sha256: df2a294a2d23116884f01bc7413affa215356c702551f9c7384a78c46f687155

Contents?: true

Size: 504 Bytes

Versions: 8

Compression:

Stored size: 504 Bytes

Contents

require 'rubygems'
require 'spec'
dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/spec_helper")
require File.expand_path("#{dir}/../lib/fjson")

context "String when not supporting unicode and KCODE is not UTF8 json" do
  setup do
    JSON.support_unicode = true
    $KCODE = ""
  end

  specify "should let high values pass through when " +
          "not supporting unicode and KCODE is not UTF8" do
    val = [0xcf].pack("U")
    JSON.utf8_to_json(val).should_equal "\303\217"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fjson-0.0.1 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.7 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.8 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.2 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.4 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.5 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.3 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb
fjson-0.0.6 spec/string_when_not_supporting_unicode_and_kcode_is_not_utf8_json_spec.rb