<commit_before>require "minitest/autorun"
require "fog/json"

class TestJSONEncoding < Minitest::Test
  def test_encode_array
    @array = %W(one two three)
    @expected = %q{["one","two","three"]}
    assert_equal @expected, Fog::JSON.encode(@array)
  end

  def test_encode_hash
    @hash = {
      "key" => "value"
    }
    @expected = %q{{"key":"value"}}
    assert_equal @expected, Fog::JSON.encode(@hash)
  end

  def test_encode_with_bad_input
    assert_raises(Fog::JSON::EncodeError) { Fog::JSON.encode("\x82\xAC\xEF") }
  end
end<commit_msg>Skip test for Ruby 2.0.0<commit_after>require "minitest/autorun"
require "fog/json"

class TestJSONEncoding < Minitest::Test
  def test_encode_array
    @array = %W(one two three)
    @expected = %q{["one","two","three"]}
    assert_equal @expected, Fog::JSON.encode(@array)
  end

  def test_encode_hash
    @hash = {
      "key" => "value"
    }
    @expected = %q{{"key":"value"}}
    assert_equal @expected, Fog::JSON.encode(@hash)
  end

  def test_encode_with_bad_input
    skip if RUBY_VERSION == "2.0.0"
    assert_raises(Fog::JSON::EncodeError) { Fog::JSON.encode("\x82\xAC\xEF") }
  end
end
{'fraction_non_alphanumeric': 0.1595836947094536, 'fraction_numerical': 0.008673026886383347, 'mean_word_length': 4.017391304347826, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7626260', 'n_tokens_mistral': 439, 'n_tokens_neox': 432, 'n_words': 79}