qed 2.2.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +23 -0
- data/LICENSE +204 -0
- data/README.rdoc +13 -20
- data/VERSION +3 -3
- data/demo/01_demos.rdoc +4 -4
- data/demo/02_advice.rdoc +5 -6
- data/demo/03_helpers.rdoc +5 -4
- data/demo/04_samples.rdoc +1 -1
- data/demo/05_quote.rdoc +19 -6
- data/demo/07_toplevel.rdoc +0 -2
- data/lib/qed/advice.rb +6 -8
- data/lib/qed/command.rb +49 -17
- data/lib/qed/{script.rb → demo.rb} +10 -6
- data/lib/qed/evaluator.rb +28 -29
- data/lib/qed/package.yml +3 -3
- data/lib/qed/parser.rb +160 -53
- data/lib/qed/reporter/abstract.rb +4 -4
- data/lib/qed/reporter/bullet.rb +5 -5
- data/lib/qed/reporter/dotprogress.rb +6 -3
- data/lib/qed/reporter/html.rb +1 -1
- data/lib/qed/reporter/verbatim.rb +11 -16
- data/lib/qed/scope.rb +12 -6
- data/lib/qed/session.rb +27 -18
- data/lib/qedoc/document/template.rhtml +47 -4
- metadata +6 -6
- data/COPYING +0 -622
data/History.rdoc
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 2.3.0 / 2010-07-14
|
4
|
+
|
5
|
+
Bug to the scurry! QED has broken through the code/document ceiling and
|
6
|
+
is cracking ectoskeletons all the way to the bank. A proverbal can of
|
7
|
+
Roach-Be-Gone this is! What's that you say? I will exlpain. QED can now
|
8
|
+
run directly against code comments. Simply slip the qed command the -c
|
9
|
+
option and feed it some ruby scripts, and presto watch you commnets
|
10
|
+
fail ;) I think you can figure out what to do next.
|
11
|
+
|
12
|
+
In addition to this coolness QED has been improved under the floor
|
13
|
+
boards as well. The parser, which is much faster, now blocks commentary
|
14
|
+
paragraphs and code examples togeher in one-to-one pairings. Not only
|
15
|
+
does this clean-up the code, but it opens up the potential for Around
|
16
|
+
advice in a future version.
|
17
|
+
|
18
|
+
Changes:
|
19
|
+
|
20
|
+
* NEW! Ruby script comment run mode.
|
21
|
+
* Better parsing system uses commentary-example pairs.
|
22
|
+
* Colon can also be used to specify plain text (along with ellipsis).
|
23
|
+
* Now distributed under the more permissive Apache 2.0 license.
|
24
|
+
|
25
|
+
|
3
26
|
== 2.2.2 / 2010-06-21
|
4
27
|
|
5
28
|
An issue was reported in which the a code block at the very
|
data/LICENSE
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
.
|
2
|
+
|
3
|
+
Apache License
|
4
|
+
Version 2.0, January 2004
|
5
|
+
http://www.apache.org/licenses/
|
6
|
+
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
8
|
+
|
9
|
+
1. Definitions.
|
10
|
+
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
13
|
+
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
15
|
+
the copyright owner that is granting the License.
|
16
|
+
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
18
|
+
other entities that control, are controlled by, or are under common
|
19
|
+
control with that entity. For the purposes of this definition,
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
21
|
+
direction or management of such entity, whether by contract or
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
24
|
+
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
26
|
+
exercising permissions granted by this License.
|
27
|
+
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
29
|
+
including but not limited to software source code, documentation
|
30
|
+
source, and configuration files.
|
31
|
+
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
33
|
+
transformation or translation of a Source form, including but
|
34
|
+
not limited to compiled object code, generated documentation,
|
35
|
+
and conversions to other media types.
|
36
|
+
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
38
|
+
Object form, made available under the License, as indicated by a
|
39
|
+
copyright notice that is included in or attached to the work
|
40
|
+
(an example is provided in the Appendix below).
|
41
|
+
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
48
|
+
the Work and Derivative Works thereof.
|
49
|
+
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
51
|
+
the original version of the Work and any modifications or additions
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
63
|
+
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
66
|
+
subsequently incorporated within the Work.
|
67
|
+
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
74
|
+
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
80
|
+
where such license applies only to those patent claims licensable
|
81
|
+
by such Contributor that are necessarily infringed by their
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
84
|
+
institute patent litigation against any entity (including a
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
87
|
+
or contributory patent infringement, then any patent licenses
|
88
|
+
granted to You under this License for that Work shall terminate
|
89
|
+
as of the date such litigation is filed.
|
90
|
+
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
93
|
+
modifications, and in Source or Object form, provided that You
|
94
|
+
meet the following conditions:
|
95
|
+
|
96
|
+
(a) You must give any other recipients of the Work or
|
97
|
+
Derivative Works a copy of this License; and
|
98
|
+
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
100
|
+
stating that You changed the files; and
|
101
|
+
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
104
|
+
attribution notices from the Source form of the Work,
|
105
|
+
excluding those notices that do not pertain to any part of
|
106
|
+
the Derivative Works; and
|
107
|
+
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
110
|
+
include a readable copy of the attribution notices contained
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
113
|
+
of the following places: within a NOTICE text file distributed
|
114
|
+
as part of the Derivative Works; within the Source form or
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
116
|
+
within a display generated by the Derivative Works, if and
|
117
|
+
wherever such third-party notices normally appear. The contents
|
118
|
+
of the NOTICE file are for informational purposes only and
|
119
|
+
do not modify the License. You may add Your own attribution
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
122
|
+
that such additional attribution notices cannot be construed
|
123
|
+
as modifying the License.
|
124
|
+
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
126
|
+
may provide additional or different license terms and conditions
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
130
|
+
the conditions stated in this License.
|
131
|
+
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
135
|
+
this License, without any additional terms or conditions.
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
137
|
+
the terms of any separate license agreement you may have executed
|
138
|
+
with Licensor regarding such Contributions.
|
139
|
+
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
142
|
+
except as required for reasonable and customary use in describing the
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
144
|
+
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
154
|
+
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
160
|
+
incidental, or consequential damages of any character arising as a
|
161
|
+
result of this License or out of the use or inability to use the
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
164
|
+
other commercial damages or losses), even if such Contributor
|
165
|
+
has been advised of the possibility of such damages.
|
166
|
+
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
170
|
+
or other liability obligations and/or rights consistent with this
|
171
|
+
License. However, in accepting such obligations, You may act only
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
176
|
+
of your accepting any such warranty or additional liability.
|
177
|
+
|
178
|
+
END OF TERMS AND CONDITIONS
|
179
|
+
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
181
|
+
|
182
|
+
To apply the Apache License to your work, attach the following
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
184
|
+
replaced with your own identifying information. (Don't include
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
186
|
+
comment syntax for the file format. We also recommend that a
|
187
|
+
file or class name and description of purpose be included on the
|
188
|
+
same "printed page" as the copyright notice for easier
|
189
|
+
identification within third-party archives.
|
190
|
+
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
192
|
+
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
194
|
+
you may not use this file except in compliance with the License.
|
195
|
+
You may obtain a copy of the License at
|
196
|
+
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
198
|
+
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
202
|
+
See the License for the specific language governing permissions and
|
203
|
+
limitations under the License.
|
204
|
+
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Ruby Q.E.D.
|
2
2
|
|
3
|
-
|
3
|
+
homepage: http://proutils.github.com/qed
|
4
4
|
mailing list: http://groups.google.com/group/proutils
|
5
5
|
development: http://github.com/proutils/qed
|
6
6
|
|
@@ -106,7 +106,7 @@ the directory will be automatically loaded.
|
|
106
106
|
|
107
107
|
Within these applique scripts *advice* can be defined. Advice can be
|
108
108
|
either *event advice*, which is simply triggered by some fixed cycle
|
109
|
-
of running, such as <code>Before :
|
109
|
+
of running, such as <code>Before :each</code> or <code>After :all</code>,
|
110
110
|
and *pattern advice* which are used to match against descriptive
|
111
111
|
phrases in the QED demos. An example would be:
|
112
112
|
|
@@ -118,7 +118,7 @@ So that whenever the phrase "a new round is started" appears in a demo,
|
|
118
118
|
the @round instance variable with be reset to an empty array.
|
119
119
|
|
120
120
|
It is rather amazing what can be accomplished with such a system,
|
121
|
-
be sure to look at QED's own
|
121
|
+
be sure to look at QED's own demonstrandum to get a better notion of
|
122
122
|
how you can put the the system to use.
|
123
123
|
|
124
124
|
=== Generating Documentation
|
@@ -135,8 +135,6 @@ Use the <code>--help</code> options on each command to get more information
|
|
135
135
|
on the use of these commands.
|
136
136
|
|
137
137
|
|
138
|
-
|
139
|
-
|
140
138
|
== Requirements
|
141
139
|
|
142
140
|
QED depends on the following external libraries:
|
@@ -153,22 +151,17 @@ if they are not already installed.
|
|
153
151
|
|
154
152
|
Q.E.D.
|
155
153
|
|
156
|
-
Copyright (c) 2007
|
157
|
-
|
158
|
-
Unless otherwise permitted by the author, QED is distributed under the
|
159
|
-
terms of the GPL version 3 or greater. See COPYING file for details.
|
154
|
+
Copyright (c) 2007 Thomas Sawyer
|
160
155
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
(at your option) any later version.
|
156
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
157
|
+
you may not use this file except in compliance with the License.
|
158
|
+
You may obtain a copy of the License at
|
165
159
|
|
166
|
-
|
167
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
168
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
169
|
-
GNU General Public License for more details.
|
160
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
170
161
|
|
171
|
-
|
172
|
-
|
173
|
-
|
162
|
+
Unless required by applicable law or agreed to in writing, software
|
163
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
164
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
165
|
+
See the License for the specific language governing permissions and
|
166
|
+
limitations under the License.
|
174
167
|
|
data/VERSION
CHANGED
data/demo/01_demos.rdoc
CHANGED
@@ -12,18 +12,18 @@ Each code section is executed in order of appearance, within a
|
|
12
12
|
rescue wrapper that captures any failures or errors. If neither
|
13
13
|
a failure or error occur then the code gets a "pass".
|
14
14
|
|
15
|
-
For example, the following passes
|
15
|
+
For example, the following passes.
|
16
16
|
|
17
17
|
(2 + 2).assert == 4
|
18
18
|
|
19
19
|
While the following would "fail", as indicated by the raising of
|
20
|
-
an Assertion error
|
20
|
+
an Assertion error.
|
21
21
|
|
22
22
|
expect Assertion do
|
23
23
|
(2 + 2).assert == 5
|
24
24
|
end
|
25
25
|
|
26
|
-
And this would have raised a NameError
|
26
|
+
And this would have raised a NameError.
|
27
27
|
|
28
28
|
expect NameError do
|
29
29
|
nobody_knows_method
|
@@ -48,7 +48,7 @@ Now lets try out our new macro definition.
|
|
48
48
|
|
49
49
|
assert_integer(4)
|
50
50
|
|
51
|
-
Let's prove that it can also fail
|
51
|
+
Let's prove that it can also fail.
|
52
52
|
|
53
53
|
expect Assertion do
|
54
54
|
assert_integer("IV")
|
data/demo/02_advice.rdoc
CHANGED
@@ -48,7 +48,7 @@ There can be more than one before and after clause at a time. If we
|
|
48
48
|
define a new *before* or *after* clause later in the document,
|
49
49
|
it will be appended to the current list of clauses in use.
|
50
50
|
|
51
|
-
As a demonstration of this
|
51
|
+
As a demonstration of this,
|
52
52
|
|
53
53
|
b = nil
|
54
54
|
|
@@ -99,12 +99,12 @@ to be run when the event is triggered.
|
|
99
99
|
x = []
|
100
100
|
|
101
101
|
When(:text) do |section|
|
102
|
-
section.
|
102
|
+
section.commentary.scan(/^\*(.*?)$/) do |m|
|
103
103
|
x << $1.strip
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
Not let see if it worked
|
107
|
+
Not let see if it worked.
|
108
108
|
|
109
109
|
* SampleA
|
110
110
|
* SampleB
|
@@ -118,7 +118,6 @@ So +x+ should now contain these three list samples.
|
|
118
118
|
|
119
119
|
QED also supports comment match triggers. With the +When+ method one can
|
120
120
|
define procedures to run when a given pattern matches comment text.
|
121
|
-
For example:
|
122
121
|
|
123
122
|
When 'given a setting @a equal to (((\d+)))' do |n|
|
124
123
|
@a = n.to_i
|
@@ -139,7 +138,7 @@ so any number can be used. For example, "given a setting @a equal to 2".
|
|
139
138
|
@a.assert == 2
|
140
139
|
|
141
140
|
When clauses can also use consecutive pattern matching. For instance
|
142
|
-
we could write
|
141
|
+
we could write,
|
143
142
|
|
144
143
|
When 'first match #(((\d+)))', 'then match #(((\d+)))' do |i1, i2|
|
145
144
|
@a = [i1.to_i, i2.to_i]
|
@@ -148,7 +147,7 @@ we could write:
|
|
148
147
|
So that 'first match #1' will be looked for first, and only after
|
149
148
|
that if 'then match #2' is found, will it be condiered a complete match.
|
150
149
|
All regular expression slots are collected from all matches and passed to
|
151
|
-
the block. We can see that the rule matched this very paragraph
|
150
|
+
the block. We can see that the rule matched this very paragraph.
|
152
151
|
|
153
152
|
@a.assert == [1,2]
|
154
153
|
|
data/demo/03_helpers.rdoc
CHANGED
@@ -22,16 +22,17 @@ marked links.
|
|
22
22
|
|
23
23
|
For example, because this link, Advice[qed://helpers/advice.rb],
|
24
24
|
begins with +qed:+, it will be used to load a global
|
25
|
-
helper. We can see this with the following
|
25
|
+
helper. We can see this with the following assertion.
|
26
26
|
|
27
27
|
pudding.assert.include?('load advice.rb')
|
28
28
|
|
29
|
-
No where in the demonstration have we
|
29
|
+
No where in the demonstration have we defined +pudding+, but
|
30
30
|
it has been defined for us in the advice.rb helper script.
|
31
31
|
|
32
32
|
We can also see that the generic When clause in our advice
|
33
|
-
helper is keeping count of
|
34
|
-
script was loaded
|
33
|
+
helper is keeping count of sections. Since the helper
|
34
|
+
script was loaded two paragraphs section back, the curent count
|
35
|
+
will be 3.
|
35
36
|
|
36
37
|
count.assert == 3
|
37
38
|
|
data/demo/04_samples.rdoc
CHANGED
@@ -27,7 +27,7 @@ This makes it easy to test tables of examples.
|
|
27
27
|
|
28
28
|
The arity of the table block corresponds to the number of columns in
|
29
29
|
each row of the table. Each row is assigned in turn and run through
|
30
|
-
the coded step. Consider the following example
|
30
|
+
the coded step. Consider the following example.
|
31
31
|
|
32
32
|
Every row in the {table.yml table}[table.yml] will be assigned to
|
33
33
|
the block parameters and run through the subsequent assertion.
|
data/demo/05_quote.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Quotes
|
2
2
|
|
3
|
-
We do not always want
|
4
|
-
Sometimes it would more useful to
|
3
|
+
We do not always want verbatim clauses to be interpreted as code.
|
4
|
+
Sometimes it would more useful to treat them a plain text to
|
5
5
|
which the preceeding paragraph can make use in a processing rule.
|
6
6
|
|
7
7
|
For example let say we want to make an example out of the following
|
@@ -12,13 +12,26 @@ text...
|
|
12
12
|
this text
|
13
13
|
|
14
14
|
The use of the ellipsis ('...') tells the processor that the next
|
15
|
-
segment is a continuation of the current segment
|
16
|
-
|
17
|
-
any applicable processing rule.
|
15
|
+
segment is a plain text continuation of the current segment, rather
|
16
|
+
than example code. If the next segment is varbatim it will be added to
|
17
|
+
the end of the arguments list of any applicable processing rule.
|
18
18
|
|
19
19
|
Behind the scenes we created a rule to set the text to an instance
|
20
|
-
variable called @quote_text,
|
20
|
+
variable called @quote_text, and we can verify it is so.
|
21
21
|
|
22
22
|
@quote_text.assert == "The file will contain\n\nthis text"
|
23
23
|
|
24
|
+
Alternately we can use a colon (':') instead of ellipsis. We can repeat
|
25
|
+
the same statment as above.
|
26
|
+
|
27
|
+
For example let say we want to make an example out of the following
|
28
|
+
text:
|
29
|
+
|
30
|
+
The file will contain
|
31
|
+
|
32
|
+
different text
|
33
|
+
|
34
|
+
And again we can verify that it did in fact set the @quote_text variable.
|
35
|
+
|
36
|
+
@quote_text.assert == "The file will contain\n\ndifferent text"
|
24
37
|
|