dfect 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -3,6 +3,27 @@
3
3
  %# opening ./doc/index.html in your favorite Web browser. #%
4
4
  %# #%
5
5
 
6
+ %#----------------------------------------------------------------------------
7
+ %| section "Version 2.1.0 (2010-03-31)"
8
+ %#----------------------------------------------------------------------------
9
+
10
+ This release adds a <%= xref "Shell command", "command-line test runner" %>
11
+ and performs some minor housekeeping.
12
+
13
+ %#--------------------------------------------------------------------------
14
+ %| paragraph "New features"
15
+ %#--------------------------------------------------------------------------
16
+
17
+ * Add `bin/dfect` executable as command-line interface to this library.
18
+
19
+ %#--------------------------------------------------------------------------
20
+ %| paragraph "Housekeeping"
21
+ %#--------------------------------------------------------------------------
22
+
23
+ * Do not `require 'rubygems'` before loading the "ruby-debug" library.
24
+
25
+ * Upgrade to Inochi 2.0.0-rc2 for managing this project.
26
+
6
27
  %#----------------------------------------------------------------------------
7
28
  %| section "Version 2.0.0 (2010-03-21)"
8
29
  %#----------------------------------------------------------------------------
@@ -96,7 +117,7 @@
96
117
  %| paragraph "Housekeeping"
97
118
  %#--------------------------------------------------------------------------
98
119
 
99
- * Upgrade to Inochi 2.0.0 for managing this project.
120
+ * Upgrade to Inochi 2.0.0-rc1 for managing this project.
100
121
 
101
122
  * Make emulation libraries modify Dfect module instead of Kernel.
102
123
 
@@ -237,9 +258,9 @@
237
258
  %| paragraph "New features"
238
259
  %#--------------------------------------------------------------------------
239
260
 
240
- * Added <%= xref "Negation", "negation (m!)" %> and <%=
241
- xref "Sampling", "sampling (m?)" %> variations to <%=
242
- xref "Assertions", "assertion methods" %>.
261
+ * Added <%= xref "Negation", "negation (m!)" %> and <%=
262
+ xref "Sampling", "sampling (m?)" %> variations to <%=
263
+ xref "Assertions", "assertion methods" %>.
243
264
 
244
265
  These new methods implement assertion functionality missing so far
245
266
  (previously we could not assert that a given exception was NOT thrown)
data/MANUAL ADDED
@@ -0,0 +1,23 @@
1
+ %# #%
2
+ %# You can read this document in its full glory by #%
3
+ %# opening ./doc/index.html in your favorite Web browser. #%
4
+ %# #%
5
+
6
+ % api_reference_url = 'api/index.html'
7
+ % api_reference = "[API reference](#{api_reference_url})"
8
+ % source_code_tool = '[Git](http://git-scm.com)'
9
+ % source_code_url = 'http://github.com/sunaku/dfect'
10
+ % issue_tracker_url = 'http://github.com/sunaku/dfect/issues'
11
+
12
+ %|part "Welcome"
13
+ %+ "README"
14
+
15
+ %|part "Setup"
16
+ %+ "INSTALL"
17
+
18
+ %|part "Usage"
19
+ %+ "USAGE"
20
+
21
+ %|part "History"
22
+ %|project_history
23
+ %+ "HISTORY"
data/USAGE CHANGED
@@ -3,134 +3,74 @@
3
3
  %# opening ./doc/index.html in your favorite Web browser. #%
4
4
  %# #%
5
5
 
6
- % def example_dfect_test *example_node_args, &block_containing_code_to_run
7
- % code_to_run = __block_content__(&block_containing_code_to_run).join
8
- % code_to_run.insert 0, "require 'dfect/auto'\n\n"
6
+ %#----------------------------------------------------------------------------
7
+ %| section "Shell command"
8
+ %#----------------------------------------------------------------------------
9
9
 
10
- %|example! *example_node_args
11
- When the following test is run:
10
+ %|command! "dfect --help" do |node|
11
+ %|text
12
+ %= verbatim `ruby bin/#{node.title}`
12
13
 
13
- <%
14
- code :ruby do
15
- code_to_run
16
- end
17
- %>
14
+ %#----------------------------------------------------------------------------
15
+ %| section "Ruby library"
16
+ %#----------------------------------------------------------------------------
17
+
18
+ % def example_dfect_test *example_node_args, &block_containing_code_to_run
19
+ % code_to_run = __block_content__(&block_containing_code_to_run).join
20
+ % code_to_run.insert 0, "require 'dfect/auto'\n\n"
18
21
 
19
- Dfect will output the following:
22
+ %|example! *example_node_args
23
+ When the following test is run:
20
24
 
21
- <%
22
- text do
23
- IO.popen('ruby -Ilib 2>&1', 'w+') do |ruby|
24
- ruby.write code_to_run
25
- ruby.close_write
26
- ruby.read
25
+ <%
26
+ code :ruby do
27
+ code_to_run
27
28
  end
28
- end
29
- %>
29
+ %>
30
30
 
31
- Begin by loading Dfect into your program:
31
+ Dfect will output the following:
32
32
 
33
- %|code :ruby
34
- require 'rubygems' # only necessary if you are using Ruby 1.8
35
- require 'dfect'
33
+ <%
34
+ text do
35
+ IO.popen('ruby -Ilib 2>&1', 'w+') do |ruby|
36
+ ruby.write code_to_run
37
+ ruby.close_write
38
+ ruby.read
39
+ end
40
+ end
41
+ %>
36
42
 
37
- You now have access to the `Dfect` module, which provides methods that can be
38
- either mixed-in or called directly, according to your preference:
43
+ Begin by loading Dfect into your program:
39
44
 
40
- %|code :ruby
41
- Dfect.D "hello" do # D() is a class method
42
- puts "world"
43
- end
45
+ %|code :ruby
46
+ require 'rubygems' # only necessary if you are using Ruby 1.8
47
+ require 'dfect'
44
48
 
45
- # the above is same as:
49
+ You now have access to the `Dfect` module, which provides methods that can
50
+ be either mixed-in or called directly, according to your preference:
46
51
 
47
- include Dfect # mix-in the Dfect API
52
+ %|code :ruby
53
+ Dfect.D "hello" do # D() is a class method
54
+ puts "world"
55
+ end
48
56
 
49
- D "hello" do # D() is an instance method
50
- puts "world"
51
- end
57
+ # the above is same as:
52
58
 
53
- %#----------------------------------------------------------------------------
54
- %| section "Assertions"
55
- %#----------------------------------------------------------------------------
59
+ include Dfect # mix-in the Dfect API
56
60
 
57
- The following methods accept a block parameter and assert something about
58
- the result of executing that block. They also accept an optional message,
59
- which is shown in <%= xref "Failures", "failure reports" %> if they fail.
60
-
61
- See the <%= api_reference %> for more details and examples.
62
-
63
- %|table
64
- %|thead
65
- %|tr
66
- %|th
67
- Method
68
- %|th
69
- Description
70
- %|tbody
71
- %|tr
72
- %|td
73
- T
74
- %|td
75
- assert true (not `nil` and not `false`)
76
- %|tr
77
- %|td
78
- F
79
- %|td
80
- assert not true (`nil` or `false`)
81
- %|tr
82
- %|td
83
- E
84
- %|td
85
- assert that an execption is raised
86
- %|tr
87
- %|td
88
- C
89
- %|td
90
- assert that a symbol is thrown
61
+ D "hello" do # D() is an instance method
62
+ puts "world"
63
+ end
91
64
 
92
65
  %#--------------------------------------------------------------------------
93
- %| section "Negation"
66
+ %| section "Assertions"
94
67
  %#--------------------------------------------------------------------------
95
68
 
96
- These methods are the *opposite* of
97
- <%= xref "Assertions", "normal assertions" %>.
98
-
99
- %|table
100
- %|thead
101
- %|tr
102
- %|th
103
- Method
104
- %|th
105
- Description
106
- %|tbody
107
- %|tr
108
- %|td
109
- T!
110
- %|td
111
- same as F
112
- %|tr
113
- %|td
114
- F!
115
- %|td
116
- same as T
117
- %|tr
118
- %|td
119
- E!
120
- %|td
121
- assert that an exception is *not* raised
122
- %|tr
123
- %|td
124
- C!
125
- %|td
126
- assert that a symbol is *not* thrown
127
-
128
- %#--------------------------------------------------------------------------
129
- %| section "Sampling"
130
- %#--------------------------------------------------------------------------
69
+ The following methods accept a block parameter and assert something about
70
+ the result of executing that block. They also accept an optional message,
71
+ which is shown in <%= xref "Failures", "failure reports" %> if they fail.
131
72
 
132
- These methods allow you to *check the outcome* of an assertion without
133
- recording a success or failure for that assertion in the execution report.
73
+ See the <%= api_reference %> for more details and examples.
134
74
 
135
75
  %|table
136
76
  %|thead
@@ -142,252 +82,325 @@ either mixed-in or called directly, according to your preference:
142
82
  %|tbody
143
83
  %|tr
144
84
  %|td
145
- T?
85
+ T
146
86
  %|td
147
- returns `true` if T passes; `false` otherwise
87
+ assert true (not `nil` and not `false`)
148
88
  %|tr
149
89
  %|td
150
- F?
90
+ F
151
91
  %|td
152
- returns `true` if F passes; `false` otherwise
92
+ assert not true (`nil` or `false`)
153
93
  %|tr
154
94
  %|td
155
- E?
95
+ E
156
96
  %|td
157
- returns `true` if E passes; `false` otherwise
97
+ assert that an execption is raised
158
98
  %|tr
159
99
  %|td
160
- C?
100
+ C
161
101
  %|td
162
- returns `true` if C passes; `false` otherwise
102
+ assert that a symbol is thrown
163
103
 
164
- %#--------------------------------------------------------------------------
165
- %| section "Failures"
166
- %#--------------------------------------------------------------------------
104
+ %#------------------------------------------------------------------------
105
+ %| section "Negation"
106
+ %#------------------------------------------------------------------------
167
107
 
168
- When an assertion fails, details about the failure will be shown:
169
-
170
- - fail: block must yield true (!nil && !false)
171
- code: |-
172
- [12..22] in test/simple.rb
173
- 12
174
- 13 D "with more nested tests" do
175
- 14 x = 5
176
- 15
177
- 16 T { x > 2 } # passes
178
- => 17 F { x > 2 } # fails
179
- 18 E { x.hello } # passes
180
- 19 end
181
- 20 end
182
- 21
183
- 22 # equivalent of before(:each) or setup()
184
- vars:
185
- x: 5
186
- y: 83
187
- call:
188
- - test/simple.rb:17
189
- - test/simple.rb:3
190
-
191
- You will then be placed into a debugger to investigate the failure if the
192
- `:debug` option is enabled in the `Dfect.options` hash.
193
-
194
- Details about all assertion failures and a trace of all tests executed are
195
- stored by Dfect and provided by the `Dfect.report()` method.
108
+ These methods are the *opposite* of
109
+ <%= xref "Assertions", "normal assertions" %>.
110
+
111
+ %|table
112
+ %|thead
113
+ %|tr
114
+ %|th
115
+ Method
116
+ %|th
117
+ Description
118
+ %|tbody
119
+ %|tr
120
+ %|td
121
+ T!
122
+ %|td
123
+ same as F
124
+ %|tr
125
+ %|td
126
+ F!
127
+ %|td
128
+ same as T
129
+ %|tr
130
+ %|td
131
+ E!
132
+ %|td
133
+ assert that an exception is *not* raised
134
+ %|tr
135
+ %|td
136
+ C!
137
+ %|td
138
+ assert that a symbol is *not* thrown
196
139
 
197
- %#--------------------------------------------------------------------------
198
- %| section "Emulation"
199
- %#--------------------------------------------------------------------------
140
+ %#------------------------------------------------------------------------
141
+ %| section "Sampling"
142
+ %#------------------------------------------------------------------------
200
143
 
201
- Dfect provides emulation layers for several popular testing libraries:
144
+ These methods allow you to *check the outcome* of an assertion without
145
+ recording a success or failure for that assertion in the execution
146
+ report.
147
+
148
+ %|table
149
+ %|thead
150
+ %|tr
151
+ %|th
152
+ Method
153
+ %|th
154
+ Description
155
+ %|tbody
156
+ %|tr
157
+ %|td
158
+ T?
159
+ %|td
160
+ returns `true` if T passes; `false` otherwise
161
+ %|tr
162
+ %|td
163
+ F?
164
+ %|td
165
+ returns `true` if F passes; `false` otherwise
166
+ %|tr
167
+ %|td
168
+ E?
169
+ %|td
170
+ returns `true` if E passes; `false` otherwise
171
+ %|tr
172
+ %|td
173
+ C?
174
+ %|td
175
+ returns `true` if C passes; `false` otherwise
202
176
 
203
- * <tt>dfect/unit</tt> --- Test::Unit
204
- * <tt>dfect/mini</tt> --- Minitest
205
- * <tt>dfect/spec</tt> --- RSpec
177
+ %#------------------------------------------------------------------------
178
+ %| section "Failures"
179
+ %#------------------------------------------------------------------------
206
180
 
207
- Simply `require()` one of these emulation layers into your test suite and
208
- you can write your tests using the familiar syntax of that testing
209
- library. See [their source code](<%= source_code_url
210
- %>/tree/master/lib/dfect/) for more details.
181
+ When an assertion fails, details about the failure will be shown:
182
+
183
+ - fail: block must yield true (!nil && !false)
184
+ code: |-
185
+ [12..22] in test/simple.rb
186
+ 12
187
+ 13 D "with more nested tests" do
188
+ 14 x = 5
189
+ 15
190
+ 16 T { x > 2 } # passes
191
+ => 17 F { x > 2 } # fails
192
+ 18 E { x.hello } # passes
193
+ 19 end
194
+ 20 end
195
+ 21
196
+ 22 # equivalent of before(:each) or setup()
197
+ vars:
198
+ x: 5
199
+ y: 83
200
+ call:
201
+ - test/simple.rb:17
202
+ - test/simple.rb:3
203
+
204
+ You will then be placed into a debugger to investigate the failure if
205
+ the `:debug` option is enabled in the `Dfect.options` hash.
206
+
207
+ Details about all assertion failures and a trace of all tests executed
208
+ are stored by Dfect and provided by the `Dfect.report()` method.
211
209
 
212
- %#----------------------------------------------------------------------------
213
- %| section "Tests"
214
- %#----------------------------------------------------------------------------
210
+ %#------------------------------------------------------------------------
211
+ %| section "Emulation"
212
+ %#------------------------------------------------------------------------
215
213
 
216
- The `D()` method defines a new Dfect **test**, which is analagous to the
217
- concept of **test case** in xUnit or **describe** in rSpec. A test may
218
- contain nested tests.
214
+ Dfect provides emulation layers for several popular testing libraries:
219
215
 
220
- %|code :ruby
221
- D "outer test" do
222
- # assertions and logic here
216
+ * <tt>dfect/unit</tt> --- Test::Unit
217
+ * <tt>dfect/mini</tt> --- Minitest
218
+ * <tt>dfect/spec</tt> --- RSpec
223
219
 
224
- D "inner test" do
225
- # more assertions and logic here
226
- end
227
- end
220
+ Simply `require()` one of these emulation layers into your test suite
221
+ and you can write your tests using the familiar syntax of that testing
222
+ library. See [their source code](<%= source_code_url
223
+ %>/tree/master/lib/dfect/) for more details.
228
224
 
229
225
  %#--------------------------------------------------------------------------
230
- %| section "Execution"
226
+ %| section "Tests"
231
227
  %#--------------------------------------------------------------------------
232
228
 
233
- Tests are executed in depth-first order.
234
-
235
- You can configure the test execution process using:
229
+ The `D()` method defines a new Dfect **test**, which is analagous to the
230
+ concept of **test case** in xUnit or **describe** in rSpec. A test may
231
+ contain nested tests.
236
232
 
237
233
  %|code :ruby
238
- Dfect.options = your_options_hash
234
+ D "outer test" do
235
+ # assertions and logic here
236
+
237
+ D "inner test" do
238
+ # more assertions and logic here
239
+ end
240
+ end
239
241
 
240
- You can execute all tests defined thus far using:
242
+ %#------------------------------------------------------------------------
243
+ %| section "Execution"
244
+ %#------------------------------------------------------------------------
241
245
 
242
- %|code :ruby
243
- Dfect.run
246
+ Tests are executed in depth-first order.
244
247
 
245
- You can stop the execution at any time using:
248
+ You can configure the test execution process using:
246
249
 
247
- %|code :ruby
248
- Dfect.stop
250
+ %|code :ruby
251
+ Dfect.options = your_options_hash
249
252
 
250
- You can view the results of execution using:
253
+ You can execute all tests defined thus far using:
251
254
 
252
- %|code :ruby
253
- puts Dfect.report.to_yaml
255
+ %|code :ruby
256
+ Dfect.run
254
257
 
255
- See the <%= api_reference %> for details and examples.
258
+ You can stop the execution at any time using:
256
259
 
257
- %#------------------------------------------------------------------------
258
- %| paragraph "Automatic test execution"
259
- %#------------------------------------------------------------------------
260
+ %|code :ruby
261
+ Dfect.stop
260
262
 
261
- To mix-in the `Dfect` module into your program and execute all tests
262
- defined by your program before it terminates, simply add the following
263
- line at the top of your program:
263
+ You can view the results of execution using:
264
264
 
265
265
  %|code :ruby
266
- require 'dfect/auto'
266
+ puts Dfect.report.to_yaml
267
267
 
268
- %#------------------------------------------------------------------------
269
- %| section "Hooks"
270
- %#------------------------------------------------------------------------
268
+ See the <%= api_reference %> for details and examples.
271
269
 
272
- The `D()` method provides several entry points (hooks) into the test
273
- execution process:
270
+ %#----------------------------------------------------------------------
271
+ %| paragraph "Automatic test execution"
272
+ %#----------------------------------------------------------------------
274
273
 
275
- %|code :ruby
276
- D "outer test" do
277
- D .< { puts "before each nested test" }
278
- D .> { puts "after each nested test" }
279
- D .<< { puts "before all nested tests" }
280
- D .>> { puts "after all nested tests" }
281
-
282
- D "inner test" do
283
- # assertions and logic here
284
- end
285
- end
274
+ To mix-in the `Dfect` module into your program and execute all tests
275
+ defined by your program before it terminates, simply add the following
276
+ line at the top of your program:
286
277
 
287
- A hook method may be called multiple times. Each call registers
288
- additional logic to execute during the hook:
278
+ %|code :ruby
279
+ require 'dfect/auto'
289
280
 
290
- %|code :ruby
291
- D .< { puts "do something" }
292
- D .< { puts "do something more!" }
281
+ %#----------------------------------------------------------------------
282
+ %| section "Hooks"
283
+ %#----------------------------------------------------------------------
293
284
 
294
- %#------------------------------------------------------------------------
295
- %| section "Logging"
296
- %#------------------------------------------------------------------------
285
+ The `D()` method provides several entry points (hooks) into the test
286
+ execution process:
297
287
 
298
- The `L()` method lets you insert log messages, composed of arbitrary
299
- Ruby objects, into the test execution report.
288
+ %|code :ruby
289
+ D "outer test" do
290
+ D .< { puts "before each nested test" }
291
+ D .> { puts "after each nested test" }
292
+ D .<< { puts "before all nested tests" }
293
+ D .>> { puts "after all nested tests" }
300
294
 
301
- %|example_dfect_test "Logging information in the execution report"
302
- D 'Wizard' do
303
- L 'Preparing spell to defeat mortal foes...'
304
- end
295
+ D "inner test" do
296
+ # assertions and logic here
297
+ end
298
+ end
305
299
 
306
- D 'Magician' do
307
- L 'Preparing rabbits to pull from hat...', rand(15)
308
- end
300
+ A hook method may be called multiple times. Each call registers
301
+ additional logic to execute during the hook:
309
302
 
310
- D 'Calculator' do
311
- L Math::PI, [1, 2, 3, ['a', 'b', 'c']], {:foo => 'bar!'}
312
- end
303
+ %|code :ruby
304
+ D .< { puts "do something" }
305
+ D .< { puts "do something more!" }
313
306
 
314
- %#--------------------------------------------------------------------------
315
- %| section "Sharing"
316
- %#--------------------------------------------------------------------------
307
+ %#----------------------------------------------------------------------
308
+ %| section "Logging"
309
+ %#----------------------------------------------------------------------
310
+
311
+ The `L()` method lets you insert log messages, composed of arbitrary
312
+ Ruby objects, into the test execution report.
313
+
314
+ %|example_dfect_test "Logging information in the execution report"
315
+ D 'Wizard' do
316
+ L 'Preparing spell to defeat mortal foes...'
317
+ end
318
+
319
+ D 'Magician' do
320
+ L 'Preparing rabbits to pull from hat...', rand(15)
321
+ end
317
322
 
318
- The `S()` method is a mechanism for sharing code. When called with a
319
- block, it shares the given block (under a given identifier) for injection
320
- into other tests. When called without a block, it injects a previously
321
- shared block (under a given identifier) into the environment where it is
322
- called.
323
+ D 'Calculator' do
324
+ L Math::PI, [1, 2, 3, ['a', 'b', 'c']], {:foo => 'bar!'}
325
+ end
323
326
 
324
- The `S!()` method is a combination of the two uses of the `S()` method: it
325
- lets you simultaneously share a block of code while injecting it into the
326
- environment where that method is called.
327
+ %#------------------------------------------------------------------------
328
+ %| section "Sharing"
329
+ %#------------------------------------------------------------------------
327
330
 
328
- The `S?()` method simply checks whether any code has been shared under a
329
- given identifier.
331
+ The `S()` method is a mechanism for sharing code. When called with a
332
+ block, it shares the given block (under a given identifier) for
333
+ injection into other tests. When called without a block, it injects a
334
+ previously shared block (under a given identifier) into the environment
335
+ where it is called.
330
336
 
331
- %|example_dfect_test "Sharing code between tests"
332
- S :knowledge do
333
- L 'Knowledge is power!'
334
- end
337
+ The `S!()` method is a combination of the two uses of the `S()` method:
338
+ it lets you simultaneously share a block of code while injecting it into
339
+ the environment where that method is called.
335
340
 
336
- D 'Healer' do
337
- S :knowledge
338
- end
341
+ The `S?()` method simply checks whether any code has been shared under a
342
+ given identifier.
339
343
 
340
- D 'Warrior' do
341
- S! :strength do
342
- L 'Strength is power!'
344
+ %|example_dfect_test "Sharing code between tests"
345
+ S :knowledge do
346
+ L 'Knowledge is power!'
343
347
  end
344
- end
345
348
 
346
- D 'Wizard' do
347
- S :knowledge
348
- S :strength
349
- end
349
+ D 'Healer' do
350
+ S :knowledge
351
+ end
350
352
 
351
- D 'King' do
352
- T { S? :knowledge }
353
- T { S? :strength }
354
- F { S? :power }
355
- L 'Power is power!'
356
- end
353
+ D 'Warrior' do
354
+ S! :strength do
355
+ L 'Strength is power!'
356
+ end
357
+ end
357
358
 
358
- %#--------------------------------------------------------------------------
359
- %| section "Insulation"
360
- %#--------------------------------------------------------------------------
359
+ D 'Wizard' do
360
+ S :knowledge
361
+ S :strength
362
+ end
361
363
 
362
- The `D!()` method defines a new test that is explicitly insulated from the
363
- tests that contain it and also from the top-level Ruby environment.
364
- Root-level calls to the `D()` method are insulated by default.
364
+ D 'King' do
365
+ T { S? :knowledge }
366
+ T { S? :strength }
367
+ F { S? :power }
368
+ L 'Power is power!'
369
+ end
370
+
371
+ %#------------------------------------------------------------------------
372
+ %| section "Insulation"
373
+ %#------------------------------------------------------------------------
365
374
 
366
- Inside an insulated test, you are free to:
367
- * mix-in any modules your test logic needs
368
- * define your own constants, methods, and classes
375
+ The `D!()` method defines a new test that is explicitly insulated from
376
+ the tests that contain it and also from the top-level Ruby environment.
377
+ Root-level calls to the `D()` method are insulated by default.
369
378
 
370
- %|example_dfect_test "Insulated and uninsulated tests"
371
- D "a root-level test" do
372
- @outside = 1
373
- T { defined? @outside }
374
- T { @outside == 1 }
379
+ Inside an insulated test, you are free to:
380
+ * mix-in any modules your test logic needs
381
+ * define your own constants, methods, and classes
375
382
 
376
- D "an inner, non-insulated test" do
383
+ %|example_dfect_test "Insulated and uninsulated tests"
384
+ D "a root-level test" do
385
+ @outside = 1
377
386
  T { defined? @outside }
378
387
  T { @outside == 1 }
379
- end
380
388
 
381
- D! "an inner, insulated test" do
382
- F { defined? @outside }
383
- F { @outside == 1 }
389
+ D "an inner, non-insulated test" do
390
+ T { defined? @outside }
391
+ T { @outside == 1 }
392
+ end
384
393
 
385
- @inside = 2
386
- T { defined? @inside }
387
- T { @inside == 2 }
388
- end
394
+ D! "an inner, insulated test" do
395
+ F { defined? @outside }
396
+ F { @outside == 1 }
389
397
 
390
- F { defined? @inside }
391
- F { @inside == 2 }
392
- end
398
+ @inside = 2
399
+ T { defined? @inside }
400
+ T { @inside == 2 }
401
+ end
402
+
403
+ F { defined? @inside }
404
+ F { @inside == 2 }
405
+ end
393
406