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

describe Directive do
  let(:js_directive) { Directive.new 'js' }
  let(:css_directive) { Directive.new 'css' }

  describe '.new' do
    it { expect { Directive.new('unknown') }.to raise_error(ConfigurationError) }
  end
  
  describe '#parse' do
    it { expect { js_directive.parse('') }.to raise_error(UnknownDirectiveError) }
  end
    
  # TODO refactor all tests bellow following betterspecs.org<commit_msg>add two pending example in directive_spec.rb<commit_after>require File.expand_path File.dirname(__FILE__) + '/rspec_helper'

describe Directive do
  let(:js_directive) { Directive.new 'js' }
  let(:css_directive) { Directive.new 'css' }

  describe '.new' do
    it { expect { Directive.new('unknown') }.to raise_error(ConfigurationError) }
  end
  
  describe '#parse' do
    # it { expect { js_directive.parse('') }.to raise_error(UnknownDirectiveError) }
    # it 'return an array with empty string and empty array elements when passed into '
    context 'returned value' do
      # it { js_directive.parse('') }
      pending
    end
    
    context 'when passed into illegal directive' do
      # it ''
      pending
    end
  end
    
  # TODO refactor all tests bellow following betterspecs.org
{'fraction_non_alphanumeric': 0.10631741140215717, 'fraction_numerical': 0.0, 'mean_word_length': 3.622775800711744, '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': '7522333', 'n_tokens_mistral': 411, 'n_tokens_neox': 402, 'n_words': 112}