test/helper.rb in property_sets-2.3.0 vs test/helper.rb in property_sets-2.4.0

- old
+ new

@@ -3,11 +3,11 @@ Bundler.setup require 'test/unit' begin - require 'mocha/setup' + require 'mocha/setup' # Rails 2 rescue LoadError require 'mocha' end require 'active_support' @@ -22,14 +22,17 @@ end ActiveRecord::Base.attr_accessible end +I18n.enforce_available_locales = false if ActiveRecord::VERSION::MAJOR > 2 + require File.expand_path "../database", __FILE__ $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'property_sets' +require 'property_sets/delegator' class ActiveSupport::TestCase include ActiveRecord::TestFixtures def create_fixtures(*table_names) @@ -52,9 +55,12 @@ 123 end end class Account < ActiveRecord::Base + include PropertySets::Delegator + delegate_to_property_set :settings, :old => :hep + if ActiveRecord::VERSION::MAJOR < 4 attr_accessible :name attr_accessible :texts_attributes end