<commit_before>require 'spec_helper'


class Bear
  include Koala::HTTPService
end

describe "Koala::HTTPService" do

  describe "common methods" do
    describe "always_use_ssl accessor" do
      it "should be added" do
        Bear.methods.should include(:always_use_ssl)
        Bear.methods.should include(:always_use_ssl=)
      end
    end
    
    describe "server" do
      describe "without options[:beta]" do
        it "should return the rest server if options[:rest_api]" do<commit_msg>and fix some failing tests due to differences between 1.8.7 and 1.9.2<commit_after>require 'spec_helper'


class Bear
  include Koala::HTTPService
end

describe "Koala::HTTPService" do

  describe "common methods" do
    describe "always_use_ssl accessor" do
      it "should be added" do
        # converting method names to string is required for
        # tests to pass on 1.8.7 and 1.9.2
        Bear.methods.map(&:to_s).should include("always_use_ssl")
        Bear.methods.map(&:to_s).should include("always_use_ssl=")
      end
    end
    
    describe "server" do
      describe "without options[:beta]" do
        it "should return the rest server if options[:rest_api]" do
{'fraction_non_alphanumeric': 0.0863674851820491, 'fraction_numerical': 0.010160880609652836, 'mean_word_length': 3.1473684210526316, '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': '1206500', 'n_tokens_mistral': 364, 'n_tokens_neox': 354, 'n_words': 115}