<commit_before>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

include Mac

# TODO: support key lauouts other than QWERTY

describe KeyCode do
  describe '.key_code_to_char' do
    subject do
      KeyCode.new(key_code)
    end

    context 'key code for space key' do
      let(:key_code) do
        49
      end

      it do
        should be_printable
      end

      it do
        subject.to_s.should eql(' ')
      end
    end

    context 'key code for tab key' do
      let(:key_code) do
        48
      end

      it do
        should be_printable<commit_msg>fix spec description<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

include Mac

# TODO: support key lauouts other than QWERTY

describe KeyCode do
  describe '.new' do
    subject do
      KeyCode.new(key_code)
    end

    context 'key code for space key' do
      let(:key_code) do
        49
      end

      it do
        should be_printable
      end

      it do
        subject.to_s.should eql(' ')
      end
    end

    context 'key code for tab key' do
      let(:key_code) do
        48
      end

      it do
        should be_printable
{'fraction_non_alphanumeric': 0.06802721088435375, 'fraction_numerical': 0.006802721088435374, 'mean_word_length': 1.9061728395061728, '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': '4119193', 'n_tokens_mistral': 381, 'n_tokens_neox': 364, 'n_words': 119}