Sha256: 6c20c2bd026ea6e08f2b7ef585eb240217208b51c0fbdf573a3a5f47b6c0afa6

Contents?: true

Size: 838 Bytes

Versions: 3

Compression:

Stored size: 838 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'mememe'
require 'mememe/memes/fry_meme'

describe FryMeme do

  let(:meme) { FryMeme.new }

  it "prepends not sure if to the begining of the top phrase" do
    meme.top_phrase = "my code is good"
    expect(meme.top_phrase).to eq "not sure if my code is good"
  end

  it "prepends or to the begining of the bottom phrase" do
    meme.bottom_phrase = "my code is bad"
    expect(meme.bottom_phrase).to eq "or my code is bad"
  end

  it "uses the fry.jpg image" do
    expect(meme.image).to eq(MemeMe.images[:fry])
  end

  it "has a name of 'fry'" do
    FileUtils.rm_rf TMP_DIR if File.exists? TMP_DIR
    FileUtils.mkdir TMP_DIR
    meme.top_phrase = "my code is an unbearable mess word"
    meme.generate TMP_DIR
    expect(meme.name).to eq('fry')
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mememe-0.1.2 spec/fry_meme_spec.rb
mememe-0.1.1 spec/fry_meme_spec.rb
mememe-0.1.0 spec/fry_meme_spec.rb