test/helper.rb in property_sets-0.2.0 vs test/helper.rb in property_sets-0.3.0
- old
+ new
@@ -11,11 +11,11 @@
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/test.log")
load(File.dirname(__FILE__) + "/schema.rb")
$LOAD_PATH.unshift(File.dirname(__FILE__))
-require 'property_sets'
+require File.dirname(__FILE__)+'/../lib/property_sets'
class ActiveSupport::TestCase
include ActiveRecord::TestFixtures
def create_fixtures(*table_names)
@@ -30,5 +30,22 @@
self.use_instantiated_fixtures = false
end
ActiveSupport::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
$LOAD_PATH.unshift(ActiveSupport::TestCase.fixture_path)
+
+class Account < ActiveRecord::Base
+ property_set :settings do
+ property :foo
+ property :bar
+ property :baz
+ property :hep, :default => 'skep'
+ property :pro, :protected => true
+ end
+
+ property_set :texts do
+ property :foo
+ property :bar
+ end
+
+ accepts_nested_attributes_for :texts
+end