• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂19 (tree)
時間2007-09-02 22:25:48
作者junkikuchi

Log Message

chagned it does not extend DB::Row class when require the db/preference.rb.

Change Summary

差異

--- trunk/test/test_db_preference.rb (revision 18)
+++ trunk/test/test_db_preference.rb (revision 19)
@@ -7,6 +7,8 @@
77
88 class DBPreferenceTest < Test::Unit::TestCase
99 class Preference < Tenarai::DB::Row
10+ extend Tenarai::Preference::Container
11+
1012 column Tenarai::DB::Preference.new('preference')
1113 preference 'panel' do |panel|
1214 panel.group 'size' do |size|
@@ -16,6 +18,12 @@
1618 end
1719 end
1820
21+ class Preference1 < Tenarai::DB::Row
22+ extend Tenarai::Preference::Container
23+
24+ column Tenarai::DB::Preference.new('preference')
25+ end
26+
1927 def setup
2028 @config = YAML.load_file(File.dirname(__FILE__) + '/db.yaml')
2129 end
@@ -37,6 +45,9 @@
3745
3846 assert_equal('10px', t1.preference.panel.size.width.value)
3947 assert_equal('30px', t1.preference.panel.size.height.value)
48+
49+ t2 = Preference1.new(t)
50+ t2.save
4051 end
4152 end
4253
--- trunk/lib/tenarai/db/preference.rb (revision 18)
+++ trunk/lib/tenarai/db/preference.rb (revision 19)
@@ -7,10 +7,6 @@
77
88 module Tenarai
99 class DB
10- class Row
11- extend Tenarai::Preference::Container
12- end
13-
1410 class Preference < Column
1511 def execute(command)
1612 command.preference(self)
Show on old repository browser