<commit_before>require "coveralls"
Coveralls.wear! do
  add_filter "/spec/"
end

require "rspec"
require "pry"
require "fakeweb"
require "onebox"
require 'mocha/api'

require_relative "support/html_spec_helper"

RSpec.configure do |config|
  config.include HTMLSpecHelper
end

shared_examples_for "an engine" do
  it "should behave like an engine" do
    expect(described_class.private_instance_methods).to include(:data, :record, :raw)
  end

  it "should have implemented a data method" do
    expect { described_class.new(link).send(:data) }.not_to raise_error
  end

  it "should match the matching expression" do
    onebox = Onebox::Matcher.new(link).oneboxed
    expect(onebox).to be(described_class)
  end
end
<commit_msg>Rephrasing for failing tests messages<commit_after>require "coveralls"
Coveralls.wear! do
  add_filter "/spec/"
end

require "rspec"
require "pry"
require "fakeweb"
require "onebox"
require 'mocha/api'

require_relative "support/html_spec_helper"

RSpec.configure do |config|
  config.include HTMLSpecHelper
end

shared_examples_for "an engine" do
  it "has engine behavior" do
    expect(described_class.private_instance_methods).to include(:data, :record, :raw)
  end

  it "has implemented the data functionality" do
    expect { described_class.new(link).send(:data) }.not_to raise_error
  end

  it "correctly matches the url" do
    onebox = Onebox::Matcher.new(link).oneboxed
    expect(onebox).to be(described_class)
  end
end

{'fraction_non_alphanumeric': 0.09556313993174062, 'fraction_numerical': 0.0, 'mean_word_length': 4.983673469387755, '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': '1027624', 'n_tokens_mistral': 488, 'n_tokens_neox': 474, 'n_words': 134}