timecop-rspec 1.0.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.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/.devcontainer/devcontainer.json +26 -0
- data/.env.local.example +3 -0
- data/.envrc +41 -0
- data/.github/FUNDING.yml +13 -0
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/ancient.yml +77 -0
- data/.github/workflows/auto-assign.yml +21 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/coverage.yml +126 -0
- data/.github/workflows/current.yml +85 -0
- data/.github/workflows/dependency-review.yml +20 -0
- data/.github/workflows/deps_locked.yml +75 -0
- data/.github/workflows/deps_unlocked.yml +84 -0
- data/.github/workflows/discord-notifier.yml +38 -0
- data/.github/workflows/heads.yml +84 -0
- data/.github/workflows/jruby.yml +75 -0
- data/.github/workflows/legacy.yml +67 -0
- data/.github/workflows/style.yml +64 -0
- data/.github/workflows/supported.yml +82 -0
- data/.github/workflows/truffle.yml +75 -0
- data/.github/workflows/unsupported.yml +75 -0
- data/.gitignore +45 -0
- data/.gitlab-ci.yml +44 -0
- data/.idea/.gitignore +8 -0
- data/.idea/GitLink.xml +6 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/timecop-rspec.iml +120 -0
- data/.idea/vcs.xml +6 -0
- data/.junie/TASK_NOTE.md +1 -0
- data/.junie/guidelines.md +139 -0
- data/.qlty/qlty.toml +79 -0
- data/.rspec +8 -0
- data/.rubocop.yml +15 -0
- data/.rubocop_gradual.lock +76 -0
- data/.simplecov +11 -0
- data/.tool-versions +1 -0
- data/.yard_gfm_support.rb +22 -0
- data/.yardopts +11 -0
- data/Appraisal.root.gemfile +12 -0
- data/Appraisals +104 -0
- data/CHANGELOG.md +27 -0
- data/CITATION.cff +20 -0
- data/CNAME +1 -0
- data/CODE_OF_CONDUCT.md +134 -0
- data/CONTRIBUTING.md +145 -0
- data/Gemfile +38 -0
- data/Gemfile.lock +315 -0
- data/LICENSE.txt +22 -0
- data/README.md +563 -0
- data/REEK +0 -0
- data/RUBOCOP.md +71 -0
- data/Rakefile +287 -0
- data/SECURITY.md +21 -0
- data/bin/appraisal +16 -0
- data/bin/bundle-audit +16 -0
- data/bin/bundler-audit +16 -0
- data/bin/code_climate_reek +16 -0
- data/bin/coderay +16 -0
- data/bin/console +38 -0
- data/bin/erb +16 -0
- data/bin/gem_checksums +16 -0
- data/bin/htmldiff +16 -0
- data/bin/irb +16 -0
- data/bin/kramdown +16 -0
- data/bin/ldiff +16 -0
- data/bin/nokogiri +16 -0
- data/bin/pry +16 -0
- data/bin/racc +16 -0
- data/bin/rake +16 -0
- data/bin/rdbg +16 -0
- data/bin/rdoc +16 -0
- data/bin/reek +16 -0
- data/bin/ri +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/bin/rubocop-gradual +16 -0
- data/bin/ruby-parse +16 -0
- data/bin/ruby-rewrite +16 -0
- data/bin/setup +33 -0
- data/bin/standardrb +16 -0
- data/bin/thor +16 -0
- data/bin/yard +16 -0
- data/bin/yard-junk +16 -0
- data/bin/yardoc +16 -0
- data/bin/yri +16 -0
- data/certs/pboling.pem +27 -0
- data/checksums/timecop-rspec-1.0.0.gem.sha256 +1 -0
- data/checksums/timecop-rspec-1.0.0.gem.sha512 +1 -0
- data/docs/Timecop/Rspec/ExampleDecorator.html +626 -0
- data/docs/Timecop/Rspec/SequentialTimeMachine.html +338 -0
- data/docs/Timecop/Rspec/TimeMachine.html +357 -0
- data/docs/Timecop/Rspec/TravelLog.html +440 -0
- data/docs/Timecop/Rspec/Traveler.html +353 -0
- data/docs/Timecop/Rspec/Version.html +154 -0
- data/docs/Timecop/Rspec.html +474 -0
- data/docs/Timecop.html +149 -0
- data/docs/_index.html +218 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/file.CHANGELOG.html +99 -0
- data/docs/file.CITATION.html +92 -0
- data/docs/file.CODE_OF_CONDUCT.html +201 -0
- data/docs/file.CONTRIBUTING.html +220 -0
- data/docs/file.LICENSE.html +70 -0
- data/docs/file.README.html +523 -0
- data/docs/file.REEK.html +71 -0
- data/docs/file.RUBOCOP.html +171 -0
- data/docs/file.SECURITY.html +101 -0
- data/docs/file.rspec.html +109 -0
- data/docs/file.timecop.html +72 -0
- data/docs/file_list.html +109 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +523 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +198 -0
- data/docs/top-level-namespace.html +110 -0
- data/gemfiles/audit.gemfile +10 -0
- data/gemfiles/coverage.gemfile +10 -0
- data/gemfiles/current.gemfile +8 -0
- data/gemfiles/deps_unlocked.gemfile +13 -0
- data/gemfiles/head.gemfile +9 -0
- data/gemfiles/modular/audit.gemfile +5 -0
- data/gemfiles/modular/coverage.gemfile +6 -0
- data/gemfiles/modular/documentation.gemfile +11 -0
- data/gemfiles/modular/style.gemfile +14 -0
- data/gemfiles/ruby_2_3.gemfile +5 -0
- data/gemfiles/ruby_2_4.gemfile +5 -0
- data/gemfiles/ruby_2_5.gemfile +5 -0
- data/gemfiles/ruby_2_6.gemfile +8 -0
- data/gemfiles/ruby_2_7.gemfile +8 -0
- data/gemfiles/ruby_3_0.gemfile +8 -0
- data/gemfiles/ruby_3_1.gemfile +8 -0
- data/gemfiles/ruby_3_2.gemfile +8 -0
- data/gemfiles/ruby_3_3.gemfile +8 -0
- data/gemfiles/style.gemfile +10 -0
- data/lib/timecop/rspec/example_decorator.rb +100 -0
- data/lib/timecop/rspec/sequential_time_machine.rb +80 -0
- data/lib/timecop/rspec/time_machine.rb +58 -0
- data/lib/timecop/rspec/travel_log.rb +103 -0
- data/lib/timecop/rspec/traveler.rb +68 -0
- data/lib/timecop/rspec/version.rb +37 -0
- data/lib/timecop/rspec.rb +78 -0
- data/sig/timecop/rspec.rbs +40 -0
- data/sig/timecop.rbs +2 -0
- data/timecop-rspec.gemspec +146 -0
- data.tar.gz.sig +2 -0
- metadata +434 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,474 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Timecop::Rspec
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Timecop::Rspec";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Timecop.html" title="Timecop (class)">Timecop</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Rspec</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Timecop::Rspec
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/timecop/rspec.rb<span class="defines">,<br />
|
82
|
+
lib/timecop/rspec/version.rb,<br /> lib/timecop/rspec/traveler.rb,<br /> lib/timecop/rspec/travel_log.rb,<br /> lib/timecop/rspec/time_machine.rb,<br /> lib/timecop/rspec/example_decorator.rb,<br /> lib/timecop/rspec/sequential_time_machine.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
<p>RSpec integration for the timecop gem.</p>
|
91
|
+
|
92
|
+
<p>Provides helpers to run examples with frozen or traveling time, and an<br />
|
93
|
+
optional global time that applies across examples when configured via ENV.</p>
|
94
|
+
|
95
|
+
<p>Environment variables:</p>
|
96
|
+
<ul>
|
97
|
+
<li>GLOBAL_TIME_TRAVEL_TIME: String representation of a time (preferred)</li>
|
98
|
+
<li>GLOBAL_TIME_TRAVEL_DATE: String representation of a date (fallback)</li>
|
99
|
+
</ul>
|
100
|
+
|
101
|
+
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div class="tags">
|
105
|
+
|
106
|
+
|
107
|
+
</div><h2>Defined Under Namespace</h2>
|
108
|
+
<p class="children">
|
109
|
+
|
110
|
+
|
111
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Rspec/Version.html" title="Timecop::Rspec::Version (module)">Version</a></span>
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Rspec/ExampleDecorator.html" title="Timecop::Rspec::ExampleDecorator (class)">ExampleDecorator</a></span>, <span class='object_link'><a href="Rspec/SequentialTimeMachine.html" title="Timecop::Rspec::SequentialTimeMachine (class)">SequentialTimeMachine</a></span>, <span class='object_link'><a href="Rspec/TimeMachine.html" title="Timecop::Rspec::TimeMachine (class)">TimeMachine</a></span>, <span class='object_link'><a href="Rspec/TravelLog.html" title="Timecop::Rspec::TravelLog (class)">TravelLog</a></span>, <span class='object_link'><a href="Rspec/Traveler.html" title="Timecop::Rspec::Traveler (class)">Traveler</a></span>
|
116
|
+
|
117
|
+
|
118
|
+
</p>
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Constant Summary
|
123
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<dl class="constants">
|
127
|
+
|
128
|
+
<dt id="VERSION-constant" class="">VERSION =
|
129
|
+
<div class="docstring">
|
130
|
+
<div class="discussion">
|
131
|
+
<p>Convenience constant aliasing Version::VERSION</p>
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
<div class="tags">
|
137
|
+
|
138
|
+
<p class="tag_title">Returns:</p>
|
139
|
+
<ul class="return">
|
140
|
+
|
141
|
+
<li>
|
142
|
+
|
143
|
+
|
144
|
+
<span class='type'>(<tt>String</tt>)</span>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
</ul>
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</dt>
|
154
|
+
<dd><pre class="code"><span class='const'><span class='object_link'><a href="Rspec/Version.html" title="Timecop::Rspec::Version (module)">Version</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rspec/Version.html#VERSION-constant" title="Timecop::Rspec::Version::VERSION (constant)">VERSION</a></span></span></pre></dd>
|
155
|
+
|
156
|
+
</dl>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<h2>
|
167
|
+
Class Method Summary
|
168
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
169
|
+
</h2>
|
170
|
+
|
171
|
+
<ul class="summary">
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#global_time-class_method" title="global_time (class method)">.<strong>global_time</strong> ⇒ Time </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'><p>The globally configured time parsed from ENV.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
<li class="public ">
|
197
|
+
<span class="summary_signature">
|
198
|
+
|
199
|
+
<a href="#global_time_configured%3F-class_method" title="global_time_configured? (class method)">.<strong>global_time_configured?</strong> ⇒ Boolean </a>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'><p>Whether a global time has been configured via ENV.</p>
|
214
|
+
</div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
<li class="public ">
|
220
|
+
<span class="summary_signature">
|
221
|
+
|
222
|
+
<a href="#time_machine-class_method" title="time_machine (class method)">.<strong>time_machine</strong>(sequential: false) ⇒ Timecop::Rspec::SequentialTimeMachine, Timecop::Rspec::TimeMachine </a>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
</span>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
<span class="summary_desc"><div class='inline'><p>Selects a time machine strategy.</p>
|
237
|
+
</div></span>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
241
|
+
|
242
|
+
</ul>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
<div id="class_method_details" class="method_details_list">
|
248
|
+
<h2>Class Method Details</h2>
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method_details first">
|
252
|
+
<h3 class="signature first" id="global_time-class_method">
|
253
|
+
|
254
|
+
.<strong>global_time</strong> ⇒ <tt>Time</tt>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
</h3><div class="docstring">
|
261
|
+
<div class="discussion">
|
262
|
+
<p>The globally configured time parsed from ENV.</p>
|
263
|
+
|
264
|
+
|
265
|
+
</div>
|
266
|
+
</div>
|
267
|
+
<div class="tags">
|
268
|
+
|
269
|
+
<p class="tag_title">Returns:</p>
|
270
|
+
<ul class="return">
|
271
|
+
|
272
|
+
<li>
|
273
|
+
|
274
|
+
|
275
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
—
|
280
|
+
<div class='inline'><p>the parsed time</p>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</li>
|
284
|
+
|
285
|
+
</ul>
|
286
|
+
<p class="tag_title">Raises:</p>
|
287
|
+
<ul class="raise">
|
288
|
+
|
289
|
+
<li>
|
290
|
+
|
291
|
+
|
292
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
—
|
297
|
+
<div class='inline'><p>if ENV contains an unparsable time/date string</p>
|
298
|
+
</div>
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
</ul>
|
303
|
+
|
304
|
+
</div><table class="source_code">
|
305
|
+
<tr>
|
306
|
+
<td>
|
307
|
+
<pre class="lines">
|
308
|
+
|
309
|
+
|
310
|
+
65
|
311
|
+
66
|
312
|
+
67</pre>
|
313
|
+
</td>
|
314
|
+
<td>
|
315
|
+
<pre class="code"><span class="info file"># File 'lib/timecop/rspec.rb', line 65</span>
|
316
|
+
|
317
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_global_time'>global_time</span>
|
318
|
+
<span class='ivar'>@global_time</span> <span class='op'>||=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_global_time_travel_string'>global_time_travel_string</span><span class='rparen'>)</span>
|
319
|
+
<span class='kw'>end</span></pre>
|
320
|
+
</td>
|
321
|
+
</tr>
|
322
|
+
</table>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div class="method_details ">
|
326
|
+
<h3 class="signature " id="global_time_configured?-class_method">
|
327
|
+
|
328
|
+
.<strong>global_time_configured?</strong> ⇒ <tt>Boolean</tt>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
</h3><div class="docstring">
|
335
|
+
<div class="discussion">
|
336
|
+
<p>Whether a global time has been configured via ENV.</p>
|
337
|
+
|
338
|
+
|
339
|
+
</div>
|
340
|
+
</div>
|
341
|
+
<div class="tags">
|
342
|
+
|
343
|
+
<p class="tag_title">Returns:</p>
|
344
|
+
<ul class="return">
|
345
|
+
|
346
|
+
<li>
|
347
|
+
|
348
|
+
|
349
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</li>
|
354
|
+
|
355
|
+
</ul>
|
356
|
+
|
357
|
+
</div><table class="source_code">
|
358
|
+
<tr>
|
359
|
+
<td>
|
360
|
+
<pre class="lines">
|
361
|
+
|
362
|
+
|
363
|
+
58
|
364
|
+
59
|
365
|
+
60</pre>
|
366
|
+
</td>
|
367
|
+
<td>
|
368
|
+
<pre class="code"><span class="info file"># File 'lib/timecop/rspec.rb', line 58</span>
|
369
|
+
|
370
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_global_time_configured?'>global_time_configured?</span>
|
371
|
+
<span class='id identifier rubyid_global_time_travel_string'>global_time_travel_string</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
372
|
+
<span class='kw'>end</span></pre>
|
373
|
+
</td>
|
374
|
+
</tr>
|
375
|
+
</table>
|
376
|
+
</div>
|
377
|
+
|
378
|
+
<div class="method_details ">
|
379
|
+
<h3 class="signature " id="time_machine-class_method">
|
380
|
+
|
381
|
+
.<strong>time_machine</strong>(sequential: false) ⇒ <tt><span class='object_link'><a href="Rspec/SequentialTimeMachine.html" title="Timecop::Rspec::SequentialTimeMachine (class)">Timecop::Rspec::SequentialTimeMachine</a></span></tt>, <tt><span class='object_link'><a href="Rspec/TimeMachine.html" title="Timecop::Rspec::TimeMachine (class)">Timecop::Rspec::TimeMachine</a></span></tt>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
</h3><div class="docstring">
|
388
|
+
<div class="discussion">
|
389
|
+
<p>Selects a time machine strategy.</p>
|
390
|
+
|
391
|
+
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
<div class="tags">
|
395
|
+
<p class="tag_title">Parameters:</p>
|
396
|
+
<ul class="param">
|
397
|
+
|
398
|
+
<li>
|
399
|
+
|
400
|
+
<span class='name'>sequential</span>
|
401
|
+
|
402
|
+
|
403
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
404
|
+
|
405
|
+
|
406
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
407
|
+
|
408
|
+
|
409
|
+
—
|
410
|
+
<div class='inline'><p>when true, uses a sequential strategy that<br />
|
411
|
+
can continue a travel across examples; when false, uses a simple per<br />
|
412
|
+
example strategy.</p>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
</li>
|
416
|
+
|
417
|
+
</ul>
|
418
|
+
|
419
|
+
<p class="tag_title">Returns:</p>
|
420
|
+
<ul class="return">
|
421
|
+
|
422
|
+
<li>
|
423
|
+
|
424
|
+
|
425
|
+
<span class='type'>(<tt><span class='object_link'><a href="Rspec/SequentialTimeMachine.html" title="Timecop::Rspec::SequentialTimeMachine (class)">Timecop::Rspec::SequentialTimeMachine</a></span></tt>, <tt><span class='object_link'><a href="Rspec/TimeMachine.html" title="Timecop::Rspec::TimeMachine (class)">Timecop::Rspec::TimeMachine</a></span></tt>)</span>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
</li>
|
430
|
+
|
431
|
+
</ul>
|
432
|
+
|
433
|
+
</div><table class="source_code">
|
434
|
+
<tr>
|
435
|
+
<td>
|
436
|
+
<pre class="lines">
|
437
|
+
|
438
|
+
|
439
|
+
48
|
440
|
+
49
|
441
|
+
50
|
442
|
+
51
|
443
|
+
52
|
444
|
+
53
|
445
|
+
54</pre>
|
446
|
+
</td>
|
447
|
+
<td>
|
448
|
+
<pre class="code"><span class="info file"># File 'lib/timecop/rspec.rb', line 48</span>
|
449
|
+
|
450
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_time_machine'>time_machine</span><span class='lparen'>(</span><span class='label'>sequential:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
451
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_sequential'>sequential</span>
|
452
|
+
<span class='const'><span class='object_link'><a href="Rspec/SequentialTimeMachine.html" title="Timecop::Rspec::SequentialTimeMachine (class)">SequentialTimeMachine</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Rspec/SequentialTimeMachine.html#instance-class_method" title="Timecop::Rspec::SequentialTimeMachine.instance (method)">instance</a></span></span>
|
453
|
+
<span class='kw'>else</span>
|
454
|
+
<span class='const'><span class='object_link'><a href="Rspec/TimeMachine.html" title="Timecop::Rspec::TimeMachine (class)">TimeMachine</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'><span class='object_link'><a href="Rspec/TimeMachine.html#instance-class_method" title="Timecop::Rspec::TimeMachine.instance (method)">instance</a></span></span>
|
455
|
+
<span class='kw'>end</span>
|
456
|
+
<span class='kw'>end</span></pre>
|
457
|
+
</td>
|
458
|
+
</tr>
|
459
|
+
</table>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
</div>
|
463
|
+
|
464
|
+
</div>
|
465
|
+
|
466
|
+
<div id="footer">
|
467
|
+
Generated on Sun Aug 17 14:43:14 2025 by
|
468
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
469
|
+
0.9.37 (ruby-3.4.5).
|
470
|
+
</div>
|
471
|
+
|
472
|
+
</div>
|
473
|
+
</body>
|
474
|
+
</html>
|
data/docs/Timecop.html
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Timecop
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Timecop";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (T)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Timecop</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Timecop
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Timecop</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/timecop/rspec.rb<span class="defines">,<br />
|
98
|
+
lib/timecop/rspec/version.rb,<br /> lib/timecop/rspec/traveler.rb,<br /> lib/timecop/rspec/travel_log.rb,<br /> lib/timecop/rspec/time_machine.rb,<br /> lib/timecop/rspec/example_decorator.rb,<br /> lib/timecop/rspec/sequential_time_machine.rb</span>
|
99
|
+
</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br />
|
107
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br />
|
108
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br />
|
109
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br />
|
110
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br />
|
111
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br />
|
112
|
+
THE SOFTWARE.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
|
120
|
+
</div><h2>Defined Under Namespace</h2>
|
121
|
+
<p class="children">
|
122
|
+
|
123
|
+
|
124
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Timecop/Rspec.html" title="Timecop::Rspec (module)">Rspec</a></span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</p>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div id="footer">
|
142
|
+
Generated on Sun Aug 17 14:43:14 2025 by
|
143
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
144
|
+
0.9.37 (ruby-3.4.5).
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</div>
|
148
|
+
</body>
|
149
|
+
</html>
|