<commit_before>require 'spec_helper'

describe SmokeDetector::Providers::Provider do
  let(:provider) { SmokeDetector::Providers::Provider.new }

  describe '#alert' do
    subject { provider.alert(Exception.new) }

    it 'raises an error' do
      expect { subject }.to raise_error NotImplementedError
    end
  end

  describe '#message' do
    subject { provider.message(Exception.new) }

    it 'raises an error' do
      expect { subject }.to raise_error NotImplementedError
    end
  end

end
<commit_msg>Added spec for SmokeDetector::Providers::Provider#appy_configuration_settings<commit_after>require 'spec_helper'

describe SmokeDetector::Providers::Provider do
  let(:provider) { SmokeDetector::Providers::Provider.new }

  describe '#alert' do
    subject { provider.alert(Exception.new) }

    it 'raises an error' do
      expect { subject }.to raise_error(NotImplementedError)
    end
  end

  describe '#message' do
    subject { provider.message(Exception.new) }

    it 'raises an error' do
      expect { subject }.to raise_error(NotImplementedError)
    end
  end

  describe '#apply_configuration_settings' do
    subject { provider.send(:apply_configuration_settings, config, settings) }

    context 'given a valid configuration setting' do
      let(:config) { stub(:config, :'setting=' => true) }
      let(:settings) { {setting: false} }

      it 'does not raise an error' do
        expect { subject }.to_not raise_error(ArgumentError)
      end
    end

    context 'given an invalid configuration setting' do
      let(:config) { stub(:config) }
      let(:settings) { {setting: false} }

      it 'raises an error' do
        expect { subject }.to raise_error(ArgumentError)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09855907780979827, 'fraction_numerical': 0.0, 'mean_word_length': 3.4974093264248705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7644861', 'n_tokens_mistral': 519, 'n_tokens_neox': 501, 'n_words': 143}