gloo 6.3.1 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/CLAUDE.md +13 -0
  3. data/docs/application.md +9 -0
  4. data/docs/language_objects.md +78 -0
  5. data/docs/language_scripting.md +41 -0
  6. data/docs/objects.md +1 -1
  7. data/docs/verbs.md +36 -2
  8. data/lib/VERSION +1 -1
  9. data/lib/VERSION_NOTES +13 -0
  10. data/lib/gloo/app/engine.rb +5 -1
  11. data/lib/gloo/app/log.rb +5 -5
  12. data/lib/gloo/app/settings.rb +4 -1
  13. data/lib/gloo/core/obj.rb +60 -1
  14. data/lib/gloo/core/parser.rb +30 -1
  15. data/lib/gloo/core/tokens.rb +44 -18
  16. data/lib/gloo/expr/l_string.rb +8 -4
  17. data/lib/gloo/objs/basic/script.rb +28 -2
  18. data/lib/gloo/objs/web/json.rb +4 -1
  19. data/lib/gloo/persist/comment_buffer.rb +58 -0
  20. data/lib/gloo/persist/declaration_ledger.rb +61 -0
  21. data/lib/gloo/persist/disc_mech.rb +15 -2
  22. data/lib/gloo/persist/file_loader.rb +208 -102
  23. data/lib/gloo/persist/file_saver.rb +251 -6
  24. data/lib/gloo/persist/file_storage.rb +10 -4
  25. data/lib/gloo/persist/indent_stack.rb +90 -0
  26. data/lib/gloo/persist/line_splitter.rb +18 -3
  27. data/lib/gloo/persist/persist_man.rb +193 -26
  28. data/lib/gloo/persist/script_body_collector.rb +102 -0
  29. data/lib/gloo/persist/shorthand_expander.rb +51 -0
  30. data/lib/gloo/persist/source/blank_node.rb +27 -0
  31. data/lib/gloo/persist/source/comment_node.rb +27 -0
  32. data/lib/gloo/persist/source/directive_node.rb +26 -0
  33. data/lib/gloo/persist/source/obj_node.rb +91 -0
  34. data/lib/gloo/persist/source/source_doc.rb +41 -0
  35. data/lib/gloo/verbs/list.rb +24 -2
  36. data/lib/gloo/verbs/load.rb +9 -1
  37. data/lib/gloo/verbs/reload.rb +3 -0
  38. data/lib/gloo/verbs/save.rb +57 -10
  39. data/test.gloo/ctrl/each.test.gloo +28 -30
  40. data/test.gloo/dt/date.test.gloo +69 -71
  41. data/test.gloo/dt/datetime.test.gloo +55 -57
  42. data/test.gloo/dt/time.test.gloo +70 -72
  43. data/test.gloo/lang/continuation.test.gloo +25 -27
  44. data/test.gloo/lang/convert.test.gloo +50 -52
  45. data/test.gloo/lang/dt_comparisons.test.gloo +87 -89
  46. data/test.gloo/lang/exceptions.test.gloo +42 -44
  47. data/test.gloo/lang/gloo_sys.test.gloo +100 -102
  48. data/test.gloo/lang/here.test.gloo +32 -34
  49. data/test.gloo/lang/it.test.gloo +27 -29
  50. data/test.gloo/lang/literal.test.gloo +55 -57
  51. data/test.gloo/lang/load_lib_directive.test.gloo +18 -20
  52. data/test.gloo/lang/naming.test.gloo +28 -30
  53. data/test.gloo/lang/ops.test.gloo +53 -55
  54. data/test.gloo/lang/shorthand.test.gloo +27 -0
  55. data/test.gloo/math/add.test.gloo +40 -42
  56. data/test.gloo/math/div.test.gloo +23 -25
  57. data/test.gloo/math/mult.test.gloo +23 -25
  58. data/test.gloo/math/sub.test.gloo +23 -25
  59. data/test.gloo/objs/alias.test.gloo +15 -17
  60. data/test.gloo/objs/bool.test.gloo +54 -56
  61. data/test.gloo/objs/can.test.gloo +33 -35
  62. data/test.gloo/objs/cipher.test.gloo +39 -41
  63. data/test.gloo/objs/decimal.test.gloo +27 -29
  64. data/test.gloo/objs/erb.test.gloo +47 -49
  65. data/test.gloo/objs/file.test.gloo +68 -70
  66. data/test.gloo/objs/function.test.gloo +37 -39
  67. data/test.gloo/objs/int.test.gloo +54 -56
  68. data/test.gloo/objs/json.test.gloo +57 -50
  69. data/test.gloo/objs/obj.test.gloo +68 -48
  70. data/test.gloo/objs/outline.test.gloo +48 -50
  71. data/test.gloo/objs/password.test.gloo +34 -36
  72. data/test.gloo/objs/repeat.test.gloo +42 -44
  73. data/test.gloo/objs/script.test.gloo +13 -15
  74. data/test.gloo/objs/string.test.gloo +82 -84
  75. data/test.gloo/objs/text.test.gloo +90 -92
  76. data/test.gloo/objs/untyped.test.gloo +36 -38
  77. data/test.gloo/objs/uri.test.gloo +37 -39
  78. data/test.gloo/string/str.test.gloo +15 -0
  79. data/test.gloo/verbs/break.test.gloo +12 -14
  80. data/test.gloo/verbs/check.test.gloo +22 -24
  81. data/test.gloo/verbs/context.test.gloo +11 -13
  82. data/test.gloo/verbs/create.test.gloo +7 -9
  83. data/test.gloo/verbs/eval.test.gloo +10 -12
  84. data/test.gloo/verbs/exists.test.gloo +43 -45
  85. data/test.gloo/verbs/if.test.gloo +8 -10
  86. data/test.gloo/verbs/invoke.test.gloo +73 -75
  87. data/test.gloo/verbs/list.test.gloo +21 -23
  88. data/test.gloo/verbs/load.test.gloo +27 -21
  89. data/test.gloo/verbs/log.test.gloo +7 -9
  90. data/test.gloo/verbs/move.test.gloo +12 -14
  91. data/test.gloo/verbs/put.test.gloo +10 -12
  92. data/test.gloo/verbs/reload.test.gloo +55 -0
  93. data/test.gloo/verbs/run.test.gloo +8 -10
  94. data/test.gloo/verbs/save.test.gloo +111 -0
  95. data/test.gloo/verbs/show.test.gloo +26 -28
  96. data/test.gloo/verbs/tell.test.gloo +8 -10
  97. data/test.gloo/verbs/throw.test.gloo +31 -33
  98. data/test.gloo/verbs/unless.test.gloo +13 -15
  99. data/test.gloo/verbs/unload.test.gloo +10 -12
  100. metadata +14 -1
@@ -2,46 +2,44 @@
2
2
  # Container tests
3
3
  #
4
4
 
5
- tests [can] :
6
- objs [can] :
7
- can [can] :
5
+ tests.objs.can [can] :
8
6
 
9
- a [can] :
10
- b [string] : "b"
11
- c [string] : "c"
12
- d [string] : "d"
7
+ a [can] :
8
+ b [string] : "b"
9
+ c [string] : "c"
10
+ d [string] : "d"
13
11
 
14
- count_children [test] :
15
- description [string] : Verify the number of children
16
- on_test [script] :
17
- tell tests.objs.can.a to count
18
- eval it = 3
19
- assert "expected it to be 3"
12
+ count_children [test] :
13
+ description [string] : Verify the number of children
14
+ on_test [script] :
15
+ tell tests.objs.can.a to count
16
+ eval it = 3
17
+ assert "expected it to be 3"
20
18
 
21
- test_contains [test] :
22
- description [string] : Verify the container contains
23
- on_test [script] :
24
- check tests.objs.can.a for contains?
25
- assert "expected can to contains"
19
+ test_contains [test] :
20
+ description [string] : Verify the container contains
21
+ on_test [script] :
22
+ check tests.objs.can.a for contains?
23
+ assert "expected can to contains"
26
24
 
27
- check tests.objs.can.a.b for contains?
28
- refute "expected string to not contains"
25
+ check tests.objs.can.a.b for contains?
26
+ refute "expected string to not contains"
29
27
 
30
- create_container [test] :
31
- description [string] : Create a container and verify
32
- on_test [script] :
33
- create tests.objs.can.c as container
34
- tell tests.objs.can.c to count
35
- eval it = 0
36
- assert "expected it to be 0"
28
+ create_container [test] :
29
+ description [string] : Create a container and verify
30
+ on_test [script] :
31
+ create tests.objs.can.c as container
32
+ tell tests.objs.can.c to count
33
+ eval it = 0
34
+ assert "expected it to be 0"
37
35
 
38
- create tests.objs.can.c.s as string
39
- tell tests.objs.can.c to count
40
- eval it = 1
41
- assert "expected it to be 1"
36
+ create tests.objs.can.c.s as string
37
+ tell tests.objs.can.c to count
38
+ eval it = 1
39
+ assert "expected it to be 1"
42
40
 
43
- tell tests.objs.can.c to delete_children
44
- tell tests.objs.can.c to count
45
- eval it = 0
46
- assert "expected it to be 0"
41
+ tell tests.objs.can.c to delete_children
42
+ tell tests.objs.can.c to count
43
+ eval it = 0
44
+ assert "expected it to be 0"
47
45
 
@@ -2,44 +2,42 @@
2
2
  # Cipher object tests
3
3
  #
4
4
 
5
- tests [can] :
6
- objs [can] :
7
- cipher [can] :
8
-
9
- plaintext [string] : attack at dawn
10
-
11
- round_trip [test] :
12
- description [string] : encrypt then decrypt returns the original text.
13
- on_test [script] :
14
- create tests.objs.cipher.c as cipher
15
-
16
- tell tests.objs.cipher.c to generate_keys
17
- check tests.objs.cipher.c.key for blank?
18
- refute "expected generate_keys to set a key"
19
-
20
- put ^^.plaintext into tests.objs.cipher.c.data
21
- tell tests.objs.cipher.c to encrypt
22
- eval tests.objs.cipher.c.data = ^^.plaintext
23
- refute "expected the data to be encrypted (not the plaintext)"
24
-
25
- tell tests.objs.cipher.c to decrypt
26
- eval tests.objs.cipher.c.data = ^^.plaintext
27
- assert "expected decrypt to restore the original text"
28
-
29
- shared_keys [test] :
30
- description [string] : a second cipher with the same key + init_vector can decrypt.
31
- on_test [script] :
32
- create tests.objs.cipher.a as cipher
33
- create tests.objs.cipher.b as cipher
34
-
35
- tell tests.objs.cipher.a to generate_keys
36
- put ^^.plaintext into tests.objs.cipher.a.data
37
- tell tests.objs.cipher.a to encrypt
38
-
39
- put tests.objs.cipher.a.key into tests.objs.cipher.b.key
40
- put tests.objs.cipher.a.init_vector into tests.objs.cipher.b.init_vector
41
- put tests.objs.cipher.a.data into tests.objs.cipher.b.data
42
-
43
- tell tests.objs.cipher.b to decrypt
44
- eval tests.objs.cipher.b.data = ^^.plaintext
45
- assert "expected the second cipher to decrypt with the shared key"
5
+ tests.objs.cipher [can] :
6
+
7
+ plaintext [string] : attack at dawn
8
+
9
+ round_trip [test] :
10
+ description [string] : encrypt then decrypt returns the original text.
11
+ on_test [script] :
12
+ create tests.objs.cipher.c as cipher
13
+
14
+ tell tests.objs.cipher.c to generate_keys
15
+ check tests.objs.cipher.c.key for blank?
16
+ refute "expected generate_keys to set a key"
17
+
18
+ put ^^.plaintext into tests.objs.cipher.c.data
19
+ tell tests.objs.cipher.c to encrypt
20
+ eval tests.objs.cipher.c.data = ^^.plaintext
21
+ refute "expected the data to be encrypted (not the plaintext)"
22
+
23
+ tell tests.objs.cipher.c to decrypt
24
+ eval tests.objs.cipher.c.data = ^^.plaintext
25
+ assert "expected decrypt to restore the original text"
26
+
27
+ shared_keys [test] :
28
+ description [string] : a second cipher with the same key + init_vector can decrypt.
29
+ on_test [script] :
30
+ create tests.objs.cipher.a as cipher
31
+ create tests.objs.cipher.b as cipher
32
+
33
+ tell tests.objs.cipher.a to generate_keys
34
+ put ^^.plaintext into tests.objs.cipher.a.data
35
+ tell tests.objs.cipher.a to encrypt
36
+
37
+ put tests.objs.cipher.a.key into tests.objs.cipher.b.key
38
+ put tests.objs.cipher.a.init_vector into tests.objs.cipher.b.init_vector
39
+ put tests.objs.cipher.a.data into tests.objs.cipher.b.data
40
+
41
+ tell tests.objs.cipher.b to decrypt
42
+ eval tests.objs.cipher.b.data = ^^.plaintext
43
+ assert "expected the second cipher to decrypt with the shared key"
@@ -2,37 +2,35 @@
2
2
  # Decimal tests
3
3
  #
4
4
 
5
- tests [can] :
6
- objs [can] :
7
- decimal [can] :
5
+ tests.objs.decimal [can] :
8
6
 
9
- a [decimal] :
7
+ a [decimal] :
10
8
 
11
- set_value [test] :
12
- description [string] : Set a decimal value
13
- on_test [script] :
14
- put 3.14 into ^^.a
15
- eval ^^.a = 3.14
16
- assert "expected a to be 3.14"
9
+ set_value [test] :
10
+ description [string] : Set a decimal value
11
+ on_test [script] :
12
+ put 3.14 into ^^.a
13
+ eval ^^.a = 3.14
14
+ assert "expected a to be 3.14"
17
15
 
18
- round_decimal [test] :
19
- description [string] : Round a decimal value
20
- on_test [script] :
21
- put 3.7 into ^^.a
22
- tell ^^.a to round
23
- eval ^^.a = 4.0
24
- assert "expected a to be rounded to 4.0"
16
+ round_decimal [test] :
17
+ description [string] : Round a decimal value
18
+ on_test [script] :
19
+ put 3.7 into ^^.a
20
+ tell ^^.a to round
21
+ eval ^^.a = 4.0
22
+ assert "expected a to be rounded to 4.0"
25
23
 
26
- format_decimal [test] :
27
- description [string] : Format a decimal
28
- f [decimal] :
29
- on_test [script] :
30
- put 1234567.891 into ^.f
31
- tell ^.f to format
32
- eval it = '1,234,567.891'
33
- assert "expected formatted decimal to match"
24
+ format_decimal [test] :
25
+ description [string] : Format a decimal
26
+ f [decimal] :
27
+ on_test [script] :
28
+ put 1234567.891 into ^.f
29
+ tell ^.f to format
30
+ eval it = '1,234,567.891'
31
+ assert "expected formatted decimal to match"
34
32
 
35
- put 3.14159 into ^.f
36
- tell ^.f to format ('%.2f')
37
- eval it = '3.14'
38
- assert "expected formatted decimal to match"
33
+ put 3.14159 into ^.f
34
+ tell ^.f to format ('%.2f')
35
+ eval it = '3.14'
36
+ assert "expected formatted decimal to match"
@@ -2,52 +2,50 @@
2
2
  # ERB tests
3
3
  #
4
4
 
5
- tests [can] :
6
- objs [can] :
7
- erb [can] :
8
-
9
- greeting [string] : <%= name %>!!
10
-
11
- basic [erb] :
12
- template [text] : <%= name %>
13
- params [can] :
14
- name [string] : world
15
- result [text] :
16
-
17
- aliased_template [erb] :
18
- template [alias] : tests.objs.erb.greeting
19
- params [can] :
20
- name [string] : gloo
21
- result [text] :
22
-
23
- with_logic [erb] :
24
- template [text] : <%= n == "yes" ? "ACTIVE" : "closed" %>
25
- params [can] :
26
- n [string] : no
27
- result [text] :
28
-
29
- run_basic [test] :
30
- description [string] : Render a template with a param
31
- on_test [script] :
32
- tell ^^.basic to run
33
- eval ^^.basic.result = 'world'
34
- assert "expected template to render with the param value"
35
-
36
- run_with_aliased_template [test] :
37
- description [string] : Render a template whose 'template' child is an alias to another object
38
- on_test [script] :
39
- tell ^^.aliased_template to run
40
- eval ^^.aliased_template.result = 'gloo!!'
41
- assert "expected alias to be resolved before rendering the template"
42
-
43
- run_with_logic [test] :
44
- description [string] : A <% %> tag runs Ruby; the param drives which branch renders
45
- on_test [script] :
46
- tell ^^.with_logic to run
47
- eval ^^.with_logic.result = 'closed'
48
- assert "expected the 'no' param to render the closed branch"
49
-
50
- put 'yes' into ^^.with_logic.params.n
51
- tell ^^.with_logic to run
52
- eval ^^.with_logic.result = 'ACTIVE'
53
- assert "expected the 'yes' param to render the ACTIVE branch"
5
+ tests.objs.erb [can] :
6
+
7
+ greeting [string] : <%= name %>!!
8
+
9
+ basic [erb] :
10
+ template [text] : <%= name %>
11
+ params [can] :
12
+ name [string] : world
13
+ result [text] :
14
+
15
+ aliased_template [erb] :
16
+ template [alias] : tests.objs.erb.greeting
17
+ params [can] :
18
+ name [string] : gloo
19
+ result [text] :
20
+
21
+ with_logic [erb] :
22
+ template [text] : <%= n == "yes" ? "ACTIVE" : "closed" %>
23
+ params [can] :
24
+ n [string] : no
25
+ result [text] :
26
+
27
+ run_basic [test] :
28
+ description [string] : Render a template with a param
29
+ on_test [script] :
30
+ tell ^^.basic to run
31
+ eval ^^.basic.result = 'world'
32
+ assert "expected template to render with the param value"
33
+
34
+ run_with_aliased_template [test] :
35
+ description [string] : Render a template whose 'template' child is an alias to another object
36
+ on_test [script] :
37
+ tell ^^.aliased_template to run
38
+ eval ^^.aliased_template.result = 'gloo!!'
39
+ assert "expected alias to be resolved before rendering the template"
40
+
41
+ run_with_logic [test] :
42
+ description [string] : A <% %> tag runs Ruby; the param drives which branch renders
43
+ on_test [script] :
44
+ tell ^^.with_logic to run
45
+ eval ^^.with_logic.result = 'closed'
46
+ assert "expected the 'no' param to render the closed branch"
47
+
48
+ put 'yes' into ^^.with_logic.params.n
49
+ tell ^^.with_logic to run
50
+ eval ^^.with_logic.result = 'ACTIVE'
51
+ assert "expected the 'yes' param to render the ACTIVE branch"
@@ -5,73 +5,71 @@
5
5
  # file under /tmp, exercise it, and delete it at the end.
6
6
  #
7
7
 
8
- tests [can] :
9
- objs [can] :
10
- file [can] :
11
-
12
- f [file] : /tmp/gloo_file_test.txt
13
- names [file] : /Users/me/project/report.csv
14
-
15
- first [string] : first line
16
- second [string] : second line
17
- back [string] :
18
-
19
- write_read_round_trip [test] :
20
- description [string] : write puts an object's value in the file; read gets it back.
21
- on_test [script] :
22
- tell ^^.f to write ( ^^.first )
23
-
24
- check ^^.f for exists?
25
- assert "expected the file to exist after write"
26
-
27
- check ^^.f for is_file?
28
- assert "expected exists to be a regular file"
29
-
30
- check ^^.f for is_dir?
31
- refute "expected the file not to be a directory"
32
-
33
- tell ^^.f to read ( ^^.back )
34
- eval ^^.back = 'first line'
35
- assert "expected read to return what was written"
36
-
37
- tell ^^.f to delete
38
-
39
- append_adds_a_line [test] :
40
- description [string] : append adds a new line to the file.
41
- on_test [script] :
42
- tell ^^.f to write ( ^^.first )
43
- tell ^^.f to append ( ^^.second )
44
-
45
- tell ^^.f to read ( ^^.back )
46
- check ^^.back for substring? ( "first line" )
47
- assert "expected the original line to still be there"
48
- check ^^.back for substring? ( "second line" )
49
- assert "expected the appended line to be there"
50
-
51
- tell ^^.f to delete
52
-
53
- path_parts [test] :
54
- description [string] : get_name, get_ext and get_parent read the path, not the disk.
55
- on_test [script] :
56
- tell ^^.names to get_name
57
- eval it = 'report'
58
- assert "expected the base name without extension"
59
-
60
- tell ^^.names to get_ext
61
- eval it = '.csv'
62
- assert "expected the extension"
63
-
64
- tell ^^.names to get_parent
65
- eval it = '/Users/me/project'
66
- assert "expected the parent directory"
67
-
68
- delete_removes_the_file [test] :
69
- description [string] : delete removes the file from disk.
70
- on_test [script] :
71
- tell ^^.f to write ( ^^.first )
72
- check ^^.f for exists?
73
- assert "sanity: file exists before delete"
74
-
75
- tell ^^.f to delete
76
- check ^^.f for exists?
77
- refute "expected the file to be gone after delete"
8
+ tests.objs.file [can] :
9
+
10
+ f [file] : /tmp/gloo_file_test.txt
11
+ names [file] : /Users/me/project/report.csv
12
+
13
+ first [string] : first line
14
+ second [string] : second line
15
+ back [string] :
16
+
17
+ write_read_round_trip [test] :
18
+ description [string] : write puts an object's value in the file; read gets it back.
19
+ on_test [script] :
20
+ tell ^^.f to write ( ^^.first )
21
+
22
+ check ^^.f for exists?
23
+ assert "expected the file to exist after write"
24
+
25
+ check ^^.f for is_file?
26
+ assert "expected exists to be a regular file"
27
+
28
+ check ^^.f for is_dir?
29
+ refute "expected the file not to be a directory"
30
+
31
+ tell ^^.f to read ( ^^.back )
32
+ eval ^^.back = 'first line'
33
+ assert "expected read to return what was written"
34
+
35
+ tell ^^.f to delete
36
+
37
+ append_adds_a_line [test] :
38
+ description [string] : append adds a new line to the file.
39
+ on_test [script] :
40
+ tell ^^.f to write ( ^^.first )
41
+ tell ^^.f to append ( ^^.second )
42
+
43
+ tell ^^.f to read ( ^^.back )
44
+ check ^^.back for substring? ( "first line" )
45
+ assert "expected the original line to still be there"
46
+ check ^^.back for substring? ( "second line" )
47
+ assert "expected the appended line to be there"
48
+
49
+ tell ^^.f to delete
50
+
51
+ path_parts [test] :
52
+ description [string] : get_name, get_ext and get_parent read the path, not the disk.
53
+ on_test [script] :
54
+ tell ^^.names to get_name
55
+ eval it = 'report'
56
+ assert "expected the base name without extension"
57
+
58
+ tell ^^.names to get_ext
59
+ eval it = '.csv'
60
+ assert "expected the extension"
61
+
62
+ tell ^^.names to get_parent
63
+ eval it = '/Users/me/project'
64
+ assert "expected the parent directory"
65
+
66
+ delete_removes_the_file [test] :
67
+ description [string] : delete removes the file from disk.
68
+ on_test [script] :
69
+ tell ^^.f to write ( ^^.first )
70
+ check ^^.f for exists?
71
+ assert "sanity: file exists before delete"
72
+
73
+ tell ^^.f to delete
74
+ check ^^.f for exists?
75
+ refute "expected the file to be gone after delete"
@@ -7,48 +7,46 @@
7
7
  # after_invoke event.
8
8
  #
9
9
 
10
- tests [can] :
11
- objs [can] :
12
- function [can] :
10
+ tests.objs.function [can] :
13
11
 
14
- after_ran [bool] : false
12
+ after_ran [bool] : false
15
13
 
16
- greet [ƒ] :
17
- params [can] :
18
- name [string] : Default Person
19
- on_invoke [script] :
20
- put 'Hi, ' + ^.params.name into ^.result
21
- after_invoke [script] :
22
- put true into tests.objs.function.after_ran
23
- result [string] :
14
+ greet [ƒ] :
15
+ params [can] :
16
+ name [string] : Default Person
17
+ on_invoke [script] :
18
+ put 'Hi, ' + ^.params.name into ^.result
19
+ after_invoke [script] :
20
+ put true into tests.objs.function.after_ran
21
+ result [string] :
24
22
 
25
- boom [ƒ] :
26
- params [can] :
27
- on_invoke [script] :
28
- put no_such_object into ^.result
29
- after_invoke [script] :
30
- put true into tests.objs.function.after_ran
31
- result [string] :
23
+ boom [ƒ] :
24
+ params [can] :
25
+ on_invoke [script] :
26
+ put no_such_object into ^.result
27
+ after_invoke [script] :
28
+ put true into tests.objs.function.after_ran
29
+ result [string] :
32
30
 
33
- invoke_message_uses_param_defaults [test] :
34
- description [string] : the invoke message with no args runs on_invoke against the param defaults.
35
- on_test [script] :
36
- tell ^^.greet to invoke
37
- eval ^^.greet.result = 'Hi, Default Person'
38
- assert "expected on_invoke to run with the default param value"
31
+ invoke_message_uses_param_defaults [test] :
32
+ description [string] : the invoke message with no args runs on_invoke against the param defaults.
33
+ on_test [script] :
34
+ tell ^^.greet to invoke
35
+ eval ^^.greet.result = 'Hi, Default Person'
36
+ assert "expected on_invoke to run with the default param value"
39
37
 
40
- after_invoke_runs_on_success [test] :
41
- description [string] : after_invoke runs once the function has been invoked.
42
- on_test [script] :
43
- put false into ^^.after_ran
44
- tell ^^.greet to invoke
45
- eval ^^.after_ran = true
46
- assert "expected after_invoke to run after a successful invoke"
38
+ after_invoke_runs_on_success [test] :
39
+ description [string] : after_invoke runs once the function has been invoked.
40
+ on_test [script] :
41
+ put false into ^^.after_ran
42
+ tell ^^.greet to invoke
43
+ eval ^^.after_ran = true
44
+ assert "expected after_invoke to run after a successful invoke"
47
45
 
48
- after_invoke_runs_on_failure [test] :
49
- description [string] : after_invoke still runs when on_invoke hits an error.
50
- on_test [script] :
51
- put false into ^^.after_ran
52
- tell ^^.boom to invoke
53
- eval ^^.after_ran = true
54
- assert "expected after_invoke to run even after on_invoke failed"
46
+ after_invoke_runs_on_failure [test] :
47
+ description [string] : after_invoke still runs when on_invoke hits an error.
48
+ on_test [script] :
49
+ put false into ^^.after_ran
50
+ tell ^^.boom to invoke
51
+ eval ^^.after_ran = true
52
+ assert "expected after_invoke to run even after on_invoke failed"