[Tomoe-cvs 1329] CVS update: tomoe/test

Zurück zum Archiv-Index

Kouhei Sutou kous****@users*****
2006年 11月 28日 (火) 17:11:31 JST


Index: tomoe/test/dict_spec.rb
diff -u tomoe/test/dict_spec.rb:1.8 tomoe/test/dict_spec.rb:1.9
--- tomoe/test/dict_spec.rb:1.8	Tue Nov 28 12:23:01 2006
+++ tomoe/test/dict_spec.rb	Tue Nov 28 17:11:31 2006
@@ -6,32 +6,11 @@
   end
 
   specify "should load" do
-    dict = Tomoe::Dict.new(@dict_file.path, true)
+    dict = Tomoe::Dict.new(@dict_file.path, true, dict_dir, "xml")
     a = dict[@utf8]
     a.writing.strokes.should == @strokes
   end
 
-  specify "should load and save" do
-    dicts = ObjectSpace.each_object(Tomoe::Dict) {}
-    Proc.new do
-      Proc.new do
-        dict = Tomoe::Dict.new(@dict_file.path, true)
-        dict.modified = true
-        dict = nil
-        GC.start
-      end.call
-      truncate_content
-      nil
-      GC.start
-    end.call
-
-    GC.start # GCed Tomoe::Dict to ensure save
-    current_dicts = ObjectSpace.each_object(Tomoe::Dict) {}
-    current_dicts.should <= dicts
-
-    content.should == @dict_content
-  end
-
   def setup_strokes
     @strokes = [
                 [
Index: tomoe/test/tomoe-spec-utils.rb
diff -u tomoe/test/tomoe-spec-utils.rb:1.9 tomoe/test/tomoe-spec-utils.rb:1.10
--- tomoe/test/tomoe-spec-utils.rb:1.9	Tue Nov 28 11:01:29 2006
+++ tomoe/test/tomoe-spec-utils.rb	Tue Nov 28 17:11:31 2006
@@ -67,6 +67,10 @@
       File.join(top_dir, "recognizer", ".libs")
     end
 
+    def dict_dir
+      File.join(top_dir, "dict", ".libs")
+    end
+
     def setup_context
       super
       @config_file = make_config_file


tomoe-cvs メーリングリストの案内
Zurück zum Archiv-Index