Sha256: 9c0a07eebf7baa6ebda0e2c27f16b4ea57965875e455040f26f6c1bbc0898cb6
Contents?: true
Size: 628 Bytes
Versions: 9
Compression:
Stored size: 628 Bytes
Contents
require 'rails_helper' RSpec.describe Newsletter::Asset do before(:each) do Newsletter::AssetUploader.enable_processing = true end it "knows if it is an image" do asset = FactoryGirl.create(:asset) # default factory assumes image expect(asset.is_image?).to be true end it "knows if it is not an image" do asset = FactoryGirl.create(:asset, image: File.open(File.join(Rails.root, '/spec/support/files/test.pdf')) ) # default factory assumes image expect(asset.is_image?).to be false end after(:each) do Newsletter::AssetUploader.enable_processing = false end end
Version data entries
9 entries across 9 versions & 1 rubygems