Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.839 kb
require './test/helper'
class AttachmentOptionsTest < Test::Unit::TestCase
should "be a Hash" do
assert_kind_of Hash, Paperclip::AttachmentOptions.new({})
end
should "respond to []" do
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[])
end
should "deliver the specified options through []" do
intended_options = {:specific_key => "specific value"}
attachment_options = Paperclip::AttachmentOptions.new(intended_options)
assert_equal "specific value", attachment_options[:specific_key]
end
should "respond to []=" do
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[]=)
end
should "remember options set with []=" do
attachment_options = Paperclip::AttachmentOptions.new({})
attachment_options[:foo] = "bar"
assert_equal "bar", attachment_options[:foo]
end
end
Jump to Line
Something went wrong with that request. Please try again.