<commit_before>require "spec_helper"

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

  it_behaves_like "an engine"

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

    it "returns photo title" do
      expect(html).to include("Celebrating @questlove Cook4Quest w/WyattCenac")
    end

    it "returns photo" do
      expect(html).to include("jjdob.jpg")
    end

    it "returns photo description" do
      expect(html).to include("Click on the photo to comment, share or view other great photos")
    end

    it "returns URL" do
      expect(html).to include(link)<commit_msg>add link for yfrog spec to test matcher #76<commit_after>require "spec_helper"

describe Onebox::Engine::YfrogOnebox do
  let(:link) { "http://twitter.yfrog.com/h0jjdobj?sa=0" }
  before do
    fake(link, response("yfrog"))
  end

  it_behaves_like "an engine"

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

    it "returns photo title" do
      expect(html).to include("Celebrating @questlove Cook4Quest w/WyattCenac")
    end

    it "returns photo" do
      expect(html).to include("jjdob.jpg")
    end

    it "returns photo description" do
      expect(html).to include("Click on the photo to comment, share or view other great photos")
    end

    it "returns URL" do
      expect(html).to include(link)
{'fraction_non_alphanumeric': 0.11366806136680614, 'fraction_numerical': 0.0041841004184100415, 'mean_word_length': 3.498432601880878, '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': '4322199', 'n_tokens_mistral': 490, 'n_tokens_neox': 471, 'n_words': 133}