<commit_before>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))

describe Chek do
  it "normal require" do
    expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
    expect { require 'foobar-normal' }.to_not raise_error(LoadError)
    FoobarNormal.piyo.should == "piyopiyo"
  end

  context '☑' do
    it "require" do
      expect { ☑ 'foobar-can-not-require' }.to     raise_error(LoadError)
      expect { ☑ 'foobar-with-chek'       }.to_not raise_error(LoadError)
      FoobarWithChek.piyo.should == "piyopiyo"
    end
  end

  context '☐' do
    it "does not require" do
      expect { ☐ 'foobar-can-not-require' }.to_not raise_error(LoadError)
      expect { ☐ 'foobar-without-chek'    }.to_not raise_error(LoadError)
      expect { FoobarWithoutChek.piyo     }.to raise_error(NameError)
    end
  end
end
<commit_msg>Fix for newer rspec version<commit_after>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))

describe Chek do
  it "normal require" do
    expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
    expect { require 'foobar-normal' }.not_to raise_error(LoadError)
    FoobarNormal.piyo.should == "piyopiyo"
  end

  context '☑' do
    it "require" do
      expect { ☑ 'foobar-can-not-require' }.to     raise_error(LoadError)
      expect { ☑ 'foobar-with-chek'       }.not_to raise_error(LoadError)
      FoobarWithChek.piyo.should == "piyopiyo"
    end
  end

  context '☐' do
    it "does not require" do
      expect { ☐ 'foobar-can-not-require' }.not_to raise_error(LoadError)
      expect { ☐ 'foobar-without-chek'    }.not_to raise_error(LoadError)
      expect { FoobarWithoutChek.piyo     }.to raise_error(NameError)
    end
  end
end

{'fraction_non_alphanumeric': 0.13187954309449637, 'fraction_numerical': 0.0010384215991692627, 'mean_word_length': 3.291759465478842, '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': '1022273', 'n_tokens_mistral': 752, 'n_tokens_neox': 705, 'n_words': 150}