test/helper.rb in property_sets-2.0.0 vs test/helper.rb in property_sets-2.0.1

- old
+ new

@@ -28,10 +28,16 @@ end ActiveSupport::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/" $LOAD_PATH.unshift(ActiveSupport::TestCase.fixture_path) +class ActsLikeAnInteger + def to_i + 123 + end +end + class Account < ActiveRecord::Base property_set :settings do property :foo property :bar property :baz @@ -56,7 +62,9 @@ property :string_prop, :type => :string property :datetime_prop, :type => :datetime property :float_prop, :type => :float property :int_prop, :type => :integer property :serialized_prop, :type => :serialized + property :default_prop, :type => :integer, :default => ActsLikeAnInteger.new + property :serialized_prop_with_default, :type => :serialized, :default => "[]" end end