<commit_before>require 'unit/spec_helper'
require 'ashikawa-core/connection'

describe Ashikawa::Core::Connection do
  subject { Ashikawa::Core::Connection }
  
  it "should have an IP and port" do
    connection = subject.new "http://localhost:8529"
    
    connection.ip.should == "http://localhost"
    connection.port.should == 8529
  end
  
  describe "initialized connection" do
    subject { Ashikawa::Core::Connection.new "http://localhost:8529" }
    
    it "should send a get request" do
      stub_request(:get, "http://localhost:8529/_api/my/path").to_return body: "{ \"name\": \"dude\" }"
      <commit_msg>More Make Up for Connection spec<commit_after>require 'unit/spec_helper'
require 'ashikawa-core/connection'

describe Ashikawa::Core::Connection do
  subject { Ashikawa::Core::Connection }
  
  it "should have an IP and port" do
    connection = subject.new "http://localhost:8529"
    
    connection.ip.should == "http://localhost"
    connection.port.should == 8529
  end
  
  describe "initialized connection" do
    subject { Ashikawa::Core::Connection.new "http://localhost:8529" }
    
    it "should send a get request" do
      stub_request(:get, "http://localhost:8529/_api/my/path").to_return body: '{ "name": "dude" }'
      
{'fraction_non_alphanumeric': 0.13661636219221604, 'fraction_numerical': 0.025416997617156472, 'mean_word_length': 3.6323529411764706, 'pattern_counts': {'":': 2, '<': 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': '5368405', 'n_tokens_mistral': 408, 'n_tokens_neox': 383, 'n_words': 93}