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