<commit_before>require 'spec_helper'

module SteppingStone
  describe RbServer do
    let(:context) { TextMapper::Context.new }

    subject do
      server = RbServer.new(double("reporter"))
      server.context = context
      server
    end

    describe "#apply" do
      it "sends the action to the context" do
        context.should_receive(:dispatch).with("foo")
        subject.apply("foo")
      end

      it "returns the result" do
        context.stub(:dispatch).with("foo").and_return("bar")
        # calling #result is hack to get this to pass for now
        subject.apply("foo").result.should == :passed
      end<commit_msg>RbServer#new is now arity 0<commit_after>require 'spec_helper'

module SteppingStone
  describe RbServer do
    let(:context) { TextMapper::Context.new }

    subject do
      server = RbServer.new
      server.context = context
      server
    end

    describe "#apply" do
      it "sends the action to the context" do
        context.should_receive(:dispatch).with("foo")
        subject.apply("foo")
      end

      it "returns the result" do
        context.stub(:dispatch).with("foo").and_return("bar")
        # calling #result is hack to get this to pass for now
        subject.apply("foo").result.should == :passed
      end
{'fraction_non_alphanumeric': 0.1056338028169014, 'fraction_numerical': 0.000782472613458529, 'mean_word_length': 2.664756446991404, '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': '6255162', 'n_tokens_mistral': 371, 'n_tokens_neox': 358, 'n_words': 105}