Sha256: 3f6322157c1c49ff1d76baa54c8310e16727a3903460814979eb12619907ec4a
Contents?: true
Size: 752 Bytes
Versions: 20
Compression:
Stored size: 752 Bytes
Contents
require "spec_helper" describe Paperclip::Tempfile do context "A Paperclip Tempfile" do before do @tempfile = described_class.new(["file", ".jpg"]) end after { @tempfile.close } it "has its path contain a real extension" do assert_equal ".jpg", File.extname(@tempfile.path) end it "is a real Tempfile" do assert @tempfile.is_a?(::Tempfile) end end context "Another Paperclip Tempfile" do before do @tempfile = described_class.new("file") end after { @tempfile.close } it "does not have an extension if not given one" do assert_equal "", File.extname(@tempfile.path) end it "is a real Tempfile" do assert @tempfile.is_a?(::Tempfile) end end end
Version data entries
20 entries across 20 versions & 2 rubygems