<commit_before>require 'helper'

describe 'Server' do

  before do
    @server = Object.new
    @server.extend(Bluecap::Server)
    Bluecap::Server.handlers = {}
  end

  it 'should route to appropriate handler' do
    handler = double()
    handler.should_receive(:handle)
      .with('andy')
      .once
    Bluecap::Server.handlers = {identify: handler}
    @server.receive_data('{"identify": "andy"}')
  end

  it 'should not throw an exception when no handler is found' do
    @server.receive_data('{"nope": "nuh-uh"}')
  end

end<commit_msg>Remove pointless test<commit_after>require 'helper'

describe 'Server' do

  before do
    @server = Object.new
    @server.extend(Bluecap::Server)
    Bluecap::Server.handlers = {}
  end

  it 'should route to appropriate handler' do
    handler = double()
    handler.should_receive(:handle)
      .with('andy')
      .once
    Bluecap::Server.handlers = {identify: handler}
    @server.receive_data('{"identify": "andy"}')
  end

end
{'fraction_non_alphanumeric': 0.13224821973550355, 'fraction_numerical': 0.0, 'mean_word_length': 3.493150684931507, 'pattern_counts': {'":': 3, '<': 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': '6301682', 'n_tokens_mistral': 323, 'n_tokens_neox': 309, 'n_words': 78}