Sha256: f3bb7e07bc95a056dfd44354ac47bde530f48e92d4075f884a9d99af547b1d6a
Contents?: true
Size: 722 Bytes
Versions: 9
Compression:
Stored size: 722 Bytes
Contents
require "helper" describe Picasa::File do it "raises argument error when nil path given" do assert_raises Picasa::ArgumentError do Picasa::File.new(nil) end end it "it returns file name" do file = Picasa::File.new(image_path("lena.jpg")) assert_equal "lena", file.name end it "it returns file extension" do file = Picasa::File.new(image_path("lena.jpg")) assert_equal "jpg", file.extension end it "it guesses content type" do file = Picasa::File.new(image_path("lena.jpg")) assert_equal "image/jpeg", file.content_type end it "returns binary read file" do file = Picasa::File.new(image_path("lena.jpg")) assert_equal String, file.binary.class end end
Version data entries
9 entries across 9 versions & 1 rubygems