<commit_before>require "spec_helper"

describe Onebox::Engine::StackExchangeOnebox do
  let(:link) { "http://stackexchange.com" }
  before do
    fake(link, response("stackexchange"))
  end

  it_behaves_like "an engine"

  describe "#to_html" do
    let(:html) { described_class.new(link).to_html }

    it "returns the question title" do
      expect(html).to include("Concept behind these 4 lines of tricky C++ code")
    end

    it "returns the question" do
      expect(html).to include("Why does this code gives output C++Sucks? Can anyone explain the concept behind it?")<commit_msg>add link for stack exchange spec to test matcher #76<commit_after>require "spec_helper"

describe Onebox::Engine::StackExchangeOnebox do
  let(:link) { "http://stackoverflow.com/questions/17992553/concept-behind-these-four-lines-of-tricky-c-code" }
  before do
    fake(link, response("stackexchange"))
  end

  it_behaves_like "an engine"

  describe "#to_html" do
    let(:html) { described_class.new(link).to_html }

    it "returns the question title" do
      expect(html).to include("Concept behind these 4 lines of tricky C++ code")
    end

    it "returns the question" do
      expect(html).to include("Why does this code gives output C++Sucks? Can anyone explain the concept behind it?")
{'fraction_non_alphanumeric': 0.11016291698991466, 'fraction_numerical': 0.009309542280837859, 'mean_word_length': 4.180722891566265, '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': '7386607', 'n_tokens_mistral': 420, 'n_tokens_neox': 392, 'n_words': 122}