[logaling-commit] logaling/logaling-command [master] fix spec of delete_all

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
Mon Feb 6 19:03:18 JST 2012


SUZUKI Miho	2012-02-06 19:03:18 +0900 (Mon, 06 Feb 2012)

  New Revision: ac85e70ed8c4dd2ded2bb8d2596c4bd76e93b732

  Merged 899e445: Merge pull request #35 from logaling/fix-glossary-spec

  Log:
    fix spec of delete_all

  Modified files:
    spec/logaling/glossary_spec.rb

  Modified: spec/logaling/glossary_spec.rb (+5 -4)
===================================================================
--- spec/logaling/glossary_spec.rb    2012-02-02 12:21:23 +0900 (e0d36f6)
+++ spec/logaling/glossary_spec.rb    2012-02-06 19:03:18 +0900 (1d6a8b2)
@@ -152,8 +152,7 @@ module Logaling
             glossary.add("delete_logaling", "てすと1", "備考")
             glossary.add("delete_logaling", "てすと2", "備考")
             glossary.delete_all("delete_logaling", true)
-            repository.index
-            @result = repository.lookup("delete_logaling", "en", "ja", project)
+            @result = Logaling::Glossary.load_glossary_yml(glossary_path)
           end
 
           it {
@@ -161,8 +160,10 @@ module Logaling
           }
 
           it "should delete terms when force option is true" do
-            @result.any?{|term| term[:source_term] == "delete_logaling" && term[:target_term] == "てすと1"}.should be_false
-            @result.any?{|term| term[:source_term] == "delete_logaling" && term[:target_term] == "てすと2"}.should be_false
+            @result.any?{|term| term == {"source_term"=>"delete_logaling", "target_term"=>"てすと1", "note"=>"備考"}}.should be_false
+            @result.any?{|term| term == {"source_term"=>"delete_logaling", "target_term"=>"てすと2", "note"=>"備考"}}.should be_false
+            @result.any?{|term| term == {"source_term"=>"user_logaling", "target_term"=>"ユーザ1", "note"=>"備考"}}.should be_true
+            @result.any?{|term| term == {"source_term"=>"user_logaling", "target_term"=>"ユーザ2", "note"=>"備考"}}.should be_true
           end
         end
       end




More information about the logaling-commit mailing list
アーカイブの一覧に戻る