<commit_before># encoding: utf-8
require 'spec_helper'
require 'markdown/code'

describe MarkdownString do
  context :code do
    cases = [
      {
        case_no: 1,
        case_title: 'string case',
        input: 'print "hoge"',
        expected: '`print "hoge"`'
      },
      {
        case_no: 2,
        case_title: 'not string case',
        input: 1,
        expected: 1,
      },
      {
        case_no: 3,
        case_title: 'empty case',
        input: '',
        expected: '``',
      },
      {
        case_no: 4,
        case_title: 'nil case',
        input: nil,
        expected: '``'
      },
    ]

    cases.each do |c|
      it "|case_no=#{c[:case_no]}|case_title=#{c[:case_title]}" do
        begin
          case_before c

          # -- given --<commit_msg>Fix rubocop warning 'TrailingComma' in code_spec<commit_after># encoding: utf-8
require 'spec_helper'
require 'markdown/code'

describe MarkdownString do
  context :code do
    cases = [
      {
        case_no: 1,
        case_title: 'string case',
        input: 'print "hoge"',
        expected: '`print "hoge"`'
      },
      {
        case_no: 2,
        case_title: 'not string case',
        input: 1,
        expected: 1
      },
      {
        case_no: 3,
        case_title: 'empty case',
        input: '',
        expected: '``'
      },
      {
        case_no: 4,
        case_title: 'nil case',
        input: nil,
        expected: '``'
      }
    ]

    cases.each do |c|
      it "|case_no=#{c[:case_no]}|case_title=#{c[:case_title]}" do
        begin
          case_before c

          # -- given --
{'fraction_non_alphanumeric': 0.1372670807453416, 'fraction_numerical': 0.008695652173913044, 'mean_word_length': 1.573482428115016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1176826', 'n_tokens_mistral': 554, 'n_tokens_neox': 533, 'n_words': 125}