test/file_persistence_test.rb in openwferu-0.9.16 vs test/file_persistence_test.rb in openwferu-0.9.17

- old
+ new

@@ -17,11 +17,11 @@ def teardown @engine.stop end def ac - return @engine.application_context + @engine.application_context end # # test persistence using yaml def test_yaml_persistence @@ -31,12 +31,12 @@ # # flow expression check def test_flow_expression fei = new_fei() - fes = YamlFileExpressionStorage.new("yaml", ac) - fe = SequenceExpression.new(fei, nil, nil, nil, nil) + fes = YamlFileExpressionStorage.new "yaml", ac + fe = SequenceExpression.new_exp fei, nil, nil, nil, nil test_persistence(fes,fe) end def test_path_splitting @@ -72,13 +72,13 @@ # # test UTF-8 data persistence def test_utf8_with_file workflow_definition_name = "みんなにARIGATOU★☆に関する最新の情報公開" - fei = new_fei(workflow_definition_name) - fes = YamlFileExpressionStorage.new("yaml", ac) - fe = SequenceExpression.new(fei, nil, nil, nil, nil) + fei = new_fei workflow_definition_name + fes = YamlFileExpressionStorage.new "yaml", ac + fe = SequenceExpression.new_exp fei, nil, nil, nil, nil loaded = test_persistence(fes, fe) #puts #puts fei.workflow_definition_name @@ -93,15 +93,11 @@ def test_persistence (fes, fe=nil) fei = new_fei() fes.delete(fei) if (fes.has_key?(fei)) - raw = - if fe == nil - RawExpression.new(fei, 'parent', 'env', nil, nil) - else - fe - end + raw = fe ? \ + fe : RawExpression.new_raw(fei, 'parent', 'env', nil, nil) assert \ (not fes.has_key?(fei)), "they key is present in the file system. "+ "Maybe a previous test did not delete the "