<commit_before>require 'open-uri'

require 'meme_captain'

describe MemeCaptain, '.meme_top_bottom' do

  it 'generates a meme image with text at the top and bottom' do
    i = MemeCaptain.meme_top_bottom(
      open('http://memecaptain.com/troll_face.jpg'), 'top text', 'bottom text')
    i.display
  end

end
<commit_msg>do not display image, check sha1 sum<commit_after>require 'digest/sha1'
require 'open-uri'
require 'tempfile'

require 'meme_captain'

describe MemeCaptain, '.meme_top_bottom' do

  it 'generates a meme image with text at the top and bottom' do
    i = MemeCaptain.meme_top_bottom(
      open('http://memecaptain.com/troll_face.jpg'), 'top text', 'bottom text')
    path = Tempfile.new('meme_captain_test').path
    i.write path
    open(path) do |f|
      Digest::SHA1.hexdigest(f.read).should ==
        '59b57d624d2cd6f0e10e1b1e25221673c192b602'
    end
  end

end

{'fraction_non_alphanumeric': 0.10998877665544332, 'fraction_numerical': 0.03479236812570146, 'mean_word_length': 3.9555555555555557, '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': '2852099', 'n_tokens_mistral': 356, 'n_tokens_neox': 329, 'n_words': 81}