Sha256: de77ccb937007d088622262bc8ef769e96e16949394f05c355e319700f94befe

Contents?: true

Size: 763 Bytes

Versions: 36

Compression:

Stored size: 763 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

# Ubuntu does not accept arguments to ruby when called using env. To get warnings to show up the -w options is
# required. That can be set in the RUBYOPT environment variable.
# export RUBYOPT=-w

$VERBOSE = true

$: << File.join(File.dirname(__FILE__), "../lib")
$: << File.join(File.dirname(__FILE__), "../ext")

require 'test/unit'
require 'stringio'
require 'oj'
require 'json'

class MimicAfter < ::Test::Unit::TestCase

  def test0_mimic_json
    assert(!defined?(JSON).nil?)
    Oj.mimic_JSON
  end

# dump
  def test_dump_string
    Oj.default_options= {:indent => 2} # JSON this will not change anything
    json = JSON.dump([1, true, nil])
    assert_equal(%{[
  1,
  true,
  null]}, json)
  end

end # MimicAfter

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
oj-2.9.4 test/test_mimic_after.rb
oj-2.9.3 test/test_mimic_after.rb
oj-2.9.2 test/test_mimic_after.rb
oj-2.9.1 test/test_mimic_after.rb
oj-2.9.0 test/test_mimic_after.rb
oj-2.8.1 test/test_mimic_after.rb
oj-2.8.0 test/test_mimic_after.rb
oj-2.7.3 test/test_mimic_after.rb
oj-2.7.2 test/test_mimic_after.rb
oj-2.7.1 test/test_mimic_after.rb
oj-2.7.0 test/test_mimic_after.rb
oj-2.6.1 test/test_mimic_after.rb
oj-2.6.0 test/test_mimic_after.rb
oj-2.5.5 test/test_mimic_after.rb
oj-2.5.4 test/test_mimic_after.rb
oj-2.5.3 test/test_mimic_after.rb
oj-2.5.2 test/test_mimic_after.rb
oj-2.5.1 test/test_mimic_after.rb
oj-2.4.3 test/test_mimic_after.rb
oj-2.4.2 test/test_mimic_after.rb