<commit_before>require_relative 'rschema'

RSpec.describe RSchema do
  describe '#validate' do
    it 'validates scalars' do
      schema = String
      expect(RSchema.validate(schema, 'Johnny')).to be(true)
      expect(RSchema.validate(schema, 5)).to be(false)
    end

    it 'validates arrays' do
      schema = [String]
      expect(RSchema.validate(schema, ['cat', 'bat'])).to be(true)
      expect(RSchema.validate(schema, [6, 'bat'])).to be(false)
    end

    it 'validates fixed-length arrays' do
      schema = [String, Integer]

      expect(RSchema.validate(schema, ['cat', 5])).to be(true)
<commit_msg>comments<commit_after>require_relative 'rschema'

RSpec.describe RSchema do
  describe '#validate' do
    it 'validates scalars' do
      schema = String
      expect(RSchema.validate(schema, 'Johnny')).to be(true)
      expect(RSchema.validate(schema, 5)).to be(false)
    end

    it 'validates variable-length arrays' do
      schema = [String]
      expect(RSchema.validate(schema, ['cat', 'bat'])).to be(true)
      expect(RSchema.validate(schema, [6, 'bat'])).to be(false)
    end

    it 'validates fixed-length arrays' do
      schema = [String, Integer]

      expect(RSchema.validate(schema, ['cat', 5])).to be(true)

{'fraction_non_alphanumeric': 0.1423974255832663, 'fraction_numerical': 0.004827031375703942, 'mean_word_length': 3.490974729241877, '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': '2173124', 'n_tokens_mistral': 408, 'n_tokens_neox': 407, 'n_words': 97}