rspec-core 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -184,7 +184,7 @@ a {
184
184
  <dt id="example_group_1">pending spec with no implementation</dt>
185
185
  <script type="text/javascript">makeYellow('rspec-header');</script>
186
186
  <script type="text/javascript">makeYellow('example_group_1');</script>
187
- <script type="text/javascript">moveProgressBar('20.0');</script>
187
+ <script type="text/javascript">moveProgressBar('14.2');</script>
188
188
  <dd class="spec not_implemented"><span class="not_implemented_spec_name">is pending (PENDING: Not Yet Implemented)</span></dd>
189
189
  </dl>
190
190
  </div>
@@ -198,7 +198,7 @@ a {
198
198
  <dt id="example_group_3">with content that would fail</dt>
199
199
  <script type="text/javascript">makeYellow('rspec-header');</script>
200
200
  <script type="text/javascript">makeYellow('example_group_3');</script>
201
- <script type="text/javascript">moveProgressBar('40.0');</script>
201
+ <script type="text/javascript">moveProgressBar('28.5');</script>
202
202
  <dd class="spec not_implemented"><span class="not_implemented_spec_name">is pending (PENDING: No reason given)</span></dd>
203
203
  </dl>
204
204
  </div>
@@ -207,22 +207,18 @@ a {
207
207
  <dt id="example_group_4">with content that would pass</dt>
208
208
  <script type="text/javascript">makeRed('rspec-header');</script>
209
209
  <script type="text/javascript">makeRed('example_group_4');</script>
210
- <script type="text/javascript">moveProgressBar('60.0');</script>
210
+ <script type="text/javascript">moveProgressBar('42.8');</script>
211
211
  <dd class="spec pending_fixed">
212
212
  <span class="failed_spec_name">fails</span>
213
213
  <div class="failure" id="failure_0">
214
214
  <div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
215
- <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=19">./spec/rspec/core/resources/formatter_specs.rb:19</a>
216
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=23">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:23</a>
217
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a>
218
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a> :in `open'
219
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a>
220
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a> :in `chdir'
221
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a>
222
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=73">./spec/spec_helper.rb:73</a>
223
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=49">./spec/spec_helper.rb:49</a> :in `instance_eval'
224
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=49">./spec/spec_helper.rb:49</a> :in `sandboxed'
225
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=73">./spec/spec_helper.rb:73</a> </pre></div>
215
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=18">./spec/rspec/core/resources/formatter_specs.rb:18</a>
216
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=24">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:24</a>
217
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a>
218
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `open'
219
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a>
220
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `chdir'
221
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> </pre></div>
226
222
  <pre class="ruby"><code><span class="linenum">11</span> <span class="keyword">rescue</span> <span class="constant">Exception</span> <span class="punct">=&gt;</span> <span class="ident">e</span>
227
223
  <span class="linenum">12</span> <span class="keyword">end</span>
228
224
  <span class="offending"><span class="linenum">13</span> <span class="keyword">raise</span> <span class="constant">RSpec</span><span class="punct">::</span><span class="constant">Core</span><span class="punct">::</span><span class="constant">PendingExampleFixedError</span><span class="punct">.</span><span class="ident">new</span> <span class="keyword">if</span> <span class="ident">result</span></span>
@@ -235,7 +231,7 @@ a {
235
231
  <div class="example_group">
236
232
  <dl>
237
233
  <dt id="example_group_5">passing spec</dt>
238
- <script type="text/javascript">moveProgressBar('80.0');</script>
234
+ <script type="text/javascript">moveProgressBar('57.1');</script>
239
235
  <dd class="spec passed"><span class="passed_spec_name">passes</span></dd>
240
236
  </dl>
241
237
  </div>
@@ -243,7 +239,7 @@ a {
243
239
  <dl>
244
240
  <dt id="example_group_6">failing spec</dt>
245
241
  <script type="text/javascript">makeRed('example_group_6');</script>
246
- <script type="text/javascript">moveProgressBar('100.0');</script>
242
+ <script type="text/javascript">moveProgressBar('71.4');</script>
247
243
  <dd class="spec failed">
248
244
  <span class="failed_spec_name">fails</span>
249
245
  <div class="failure" id="failure_0">
@@ -253,17 +249,13 @@ expected 2
253
249
 
254
250
  (compared using ==)
255
251
  </pre></div>
256
- <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=34">./spec/rspec/core/resources/formatter_specs.rb:34</a>
257
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=23">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:23</a>
258
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a>
259
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a> :in `open'
260
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=38">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:38</a>
261
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a> :in `chdir'
262
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a>
263
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=73">./spec/spec_helper.rb:73</a>
264
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=49">./spec/spec_helper.rb:49</a> :in `instance_eval'
265
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=49">./spec/spec_helper.rb:49</a> :in `sandboxed'
266
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=73">./spec/spec_helper.rb:73</a> </pre></div>
252
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=33">./spec/rspec/core/resources/formatter_specs.rb:33</a>
253
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=24">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:24</a>
254
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a>
255
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `open'
256
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a>
257
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `chdir'
258
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> </pre></div>
267
259
  <pre class="ruby"><code><span class="linenum">27</span> <span class="keyword">end</span>
268
260
  <span class="linenum">28</span>
269
261
  <span class="offending"><span class="linenum">29</span> <span class="keyword">raise</span><span class="punct">(</span><span class="constant">RSpec</span><span class="punct">::</span><span class="constant">Expectations</span><span class="punct">::</span><span class="constant">ExpectationNotMetError</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">message</span><span class="punct">))</span></span>
@@ -272,8 +264,32 @@ expected 2
272
264
  </dd>
273
265
  </dl>
274
266
  </div>
267
+ <div class="example_group">
268
+ <dl>
269
+ <dt id="example_group_7">a failing spec with odd backtraces</dt>
270
+ <script type="text/javascript">makeRed('example_group_7');</script>
271
+ <script type="text/javascript">moveProgressBar('85.7');</script>
272
+ <dd class="spec failed">
273
+ <span class="failed_spec_name">fails with a backtrace that has no file</span>
274
+ <div class="failure" id="failure_0">
275
+ <div class="message"><pre>foo</pre></div>
276
+ <div class="backtrace"><pre>(erb):1</pre></div>
277
+ <pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
278
+ </div>
279
+ </dd>
280
+ <script type="text/javascript">moveProgressBar('100.0');</script>
281
+ <dd class="spec failed">
282
+ <span class="failed_spec_name">fails with a backtrace containing an erb file</span>
283
+ <div class="failure" id="failure_0">
284
+ <div class="message"><pre>Exception</pre></div>
285
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///foo.html.erb&line=1">/foo.html.erb:1</a> :in `<main>': foo (RuntimeError)</pre></div>
286
+ <pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for /foo.html.erb</span></code></pre>
287
+ </div>
288
+ </dd>
289
+ </dl>
290
+ </div>
275
291
  <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
276
- <script type="text/javascript">document.getElementById('totals').innerHTML = "5 examples, 2 failures, 2 pending";</script>
292
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
277
293
  </div>
278
294
  </div>
279
295
  </body>
@@ -184,7 +184,7 @@ a {
184
184
  <dt id="example_group_1">pending spec with no implementation</dt>
185
185
  <script type="text/javascript">makeYellow('rspec-header');</script>
186
186
  <script type="text/javascript">makeYellow('example_group_1');</script>
187
- <script type="text/javascript">moveProgressBar('20.0');</script>
187
+ <script type="text/javascript">moveProgressBar('14.2');</script>
188
188
  <dd class="spec not_implemented"><span class="not_implemented_spec_name">is pending (PENDING: Not Yet Implemented)</span></dd>
189
189
  </dl>
190
190
  </div>
@@ -198,7 +198,7 @@ a {
198
198
  <dt id="example_group_3">with content that would fail</dt>
199
199
  <script type="text/javascript">makeYellow('rspec-header');</script>
200
200
  <script type="text/javascript">makeYellow('example_group_3');</script>
201
- <script type="text/javascript">moveProgressBar('40.0');</script>
201
+ <script type="text/javascript">moveProgressBar('28.5');</script>
202
202
  <dd class="spec not_implemented"><span class="not_implemented_spec_name">is pending (PENDING: No reason given)</span></dd>
203
203
  </dl>
204
204
  </div>
@@ -207,22 +207,22 @@ a {
207
207
  <dt id="example_group_4">with content that would pass</dt>
208
208
  <script type="text/javascript">makeRed('rspec-header');</script>
209
209
  <script type="text/javascript">makeRed('example_group_4');</script>
210
- <script type="text/javascript">moveProgressBar('60.0');</script>
210
+ <script type="text/javascript">moveProgressBar('42.8');</script>
211
211
  <dd class="spec pending_fixed">
212
212
  <span class="failed_spec_name">fails</span>
213
213
  <div class="failure" id="failure_0">
214
214
  <div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
215
- <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=19">./spec/rspec/core/resources/formatter_specs.rb:19</a> :in `block (3 levels) in <top (required)>'
216
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=23">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:23</a> :in `block (2 levels) in <module:Formatters>'
217
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `block (5 levels) in <module:Formatters>'
218
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `open'
219
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `block (4 levels) in <module:Formatters>'
220
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=42">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:42</a> :in `chdir'
221
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=42">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:42</a> :in `block (3 levels) in <module:Formatters>'
222
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=70">./spec/spec_helper.rb:70</a> :in `block (3 levels) in <top (required)>'
223
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=46">./spec/spec_helper.rb:46</a> :in `instance_eval'
224
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=46">./spec/spec_helper.rb:46</a> :in `sandboxed'
225
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=70">./spec/spec_helper.rb:70</a> :in `block (2 levels) in <top (required)>'</pre></div>
215
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=19">./spec/rspec/core/resources/formatter_specs.rb:19</a> :in `block (3 levels) in <top (required)>'
216
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=24">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:24</a> :in `block (2 levels) in <module:Formatters>'
217
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (5 levels) in <module:Formatters>'
218
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `open'
219
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (4 levels) in <module:Formatters>'
220
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `chdir'
221
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `block (3 levels) in <module:Formatters>'
222
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (3 levels) in <top (required)>'
223
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `instance_eval'
224
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `sandboxed'
225
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (2 levels) in <top (required)>'</pre></div>
226
226
  <pre class="ruby"><code><span class="linenum">11</span> <span class="keyword">rescue</span> <span class="constant">Exception</span> <span class="punct">=&gt;</span> <span class="ident">e</span>
227
227
  <span class="linenum">12</span> <span class="keyword">end</span>
228
228
  <span class="offending"><span class="linenum">13</span> <span class="keyword">raise</span> <span class="constant">RSpec</span><span class="punct">::</span><span class="constant">Core</span><span class="punct">::</span><span class="constant">PendingExampleFixedError</span><span class="punct">.</span><span class="ident">new</span> <span class="keyword">if</span> <span class="ident">result</span></span>
@@ -235,7 +235,7 @@ a {
235
235
  <div class="example_group">
236
236
  <dl>
237
237
  <dt id="example_group_5">passing spec</dt>
238
- <script type="text/javascript">moveProgressBar('80.0');</script>
238
+ <script type="text/javascript">moveProgressBar('57.1');</script>
239
239
  <dd class="spec passed"><span class="passed_spec_name">passes</span></dd>
240
240
  </dl>
241
241
  </div>
@@ -243,7 +243,7 @@ a {
243
243
  <dl>
244
244
  <dt id="example_group_6">failing spec</dt>
245
245
  <script type="text/javascript">makeRed('example_group_6');</script>
246
- <script type="text/javascript">moveProgressBar('100.0');</script>
246
+ <script type="text/javascript">moveProgressBar('71.4');</script>
247
247
  <dd class="spec failed">
248
248
  <span class="failed_spec_name">fails</span>
249
249
  <div class="failure" id="failure_0">
@@ -253,17 +253,17 @@ expected 2
253
253
 
254
254
  (compared using ==)
255
255
  </pre></div>
256
- <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=34">./spec/rspec/core/resources/formatter_specs.rb:34</a> :in `block (2 levels) in <top (required)>'
257
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=23">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:23</a> :in `block (2 levels) in <module:Formatters>'
258
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `block (5 levels) in <module:Formatters>'
259
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `open'
260
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=43">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:43</a> :in `block (4 levels) in <module:Formatters>'
261
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=42">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:42</a> :in `chdir'
262
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=42">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:42</a> :in `block (3 levels) in <module:Formatters>'
263
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=70">./spec/spec_helper.rb:70</a> :in `block (3 levels) in <top (required)>'
264
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=46">./spec/spec_helper.rb:46</a> :in `instance_eval'
265
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=46">./spec/spec_helper.rb:46</a> :in `sandboxed'
266
- <a href="txmt://open?url=file:///Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/spec/spec_helper.rb&line=70">./spec/spec_helper.rb:70</a> :in `block (2 levels) in <top (required)>'</pre></div>
256
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=34">./spec/rspec/core/resources/formatter_specs.rb:34</a> :in `block (2 levels) in <top (required)>'
257
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=24">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:24</a> :in `block (2 levels) in <module:Formatters>'
258
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (5 levels) in <module:Formatters>'
259
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `open'
260
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (4 levels) in <module:Formatters>'
261
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `chdir'
262
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `block (3 levels) in <module:Formatters>'
263
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (3 levels) in <top (required)>'
264
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `instance_eval'
265
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `sandboxed'
266
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (2 levels) in <top (required)>'</pre></div>
267
267
  <pre class="ruby"><code><span class="linenum">27</span> <span class="keyword">end</span>
268
268
  <span class="linenum">28</span>
269
269
  <span class="offending"><span class="linenum">29</span> <span class="keyword">raise</span><span class="punct">(</span><span class="constant">RSpec</span><span class="punct">::</span><span class="constant">Expectations</span><span class="punct">::</span><span class="constant">ExpectationNotMetError</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">message</span><span class="punct">))</span></span>
@@ -272,8 +272,43 @@ expected 2
272
272
  </dd>
273
273
  </dl>
274
274
  </div>
275
+ <div class="example_group">
276
+ <dl>
277
+ <dt id="example_group_7">a failing spec with odd backtraces</dt>
278
+ <script type="text/javascript">makeRed('example_group_7');</script>
279
+ <script type="text/javascript">moveProgressBar('85.7');</script>
280
+ <dd class="spec failed">
281
+ <span class="failed_spec_name">fails with a backtrace that has no file</span>
282
+ <div class="failure" id="failure_0">
283
+ <div class="message"><pre>foo</pre></div>
284
+ <div class="backtrace"><pre>(erb):1:in `<main>'
285
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=42">./spec/rspec/core/resources/formatter_specs.rb:42</a> :in `block (2 levels) in <top (required)>'
286
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=24">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:24</a> :in `block (2 levels) in <module:Formatters>'
287
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (5 levels) in <module:Formatters>'
288
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `open'
289
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=47">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:47</a> :in `block (4 levels) in <module:Formatters>'
290
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `chdir'
291
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=46">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:46</a> :in `block (3 levels) in <module:Formatters>'
292
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (3 levels) in <top (required)>'
293
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `instance_eval'
294
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=45">./spec/spec_helper.rb:45</a> :in `sandboxed'
295
+ <a href="txmt://open?url=file:///Users/alex/code/ruby/rspec-core/spec/spec_helper.rb&line=71">./spec/spec_helper.rb:71</a> :in `block (2 levels) in <top (required)>'</pre></div>
296
+ <pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
297
+ </div>
298
+ </dd>
299
+ <script type="text/javascript">moveProgressBar('100.0');</script>
300
+ <dd class="spec failed">
301
+ <span class="failed_spec_name">fails with a backtrace containing an erb file</span>
302
+ <div class="failure" id="failure_0">
303
+ <div class="message"><pre>Exception</pre></div>
304
+ <div class="backtrace"><pre><a href="txmt://open?url=file:///foo.html.erb&line=1">/foo.html.erb:1</a> :in `<main>': foo (RuntimeError)</pre></div>
305
+ <pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for /foo.html.erb</span></code></pre>
306
+ </div>
307
+ </dd>
308
+ </dl>
309
+ </div>
275
310
  <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
276
- <script type="text/javascript">document.getElementById('totals').innerHTML = "5 examples, 2 failures, 2 pending";</script>
311
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
277
312
  </div>
278
313
  </div>
279
314
  </body>
@@ -23,6 +23,7 @@ module RSpec
23
23
  command_line = RSpec::Core::CommandLine.new(options)
24
24
  command_line.run(err, out)
25
25
  out.string.gsub /\d+\.\d+ seconds/, 'x seconds'
26
+
26
27
  end
27
28
 
28
29
  let(:expected_html) do
@@ -64,6 +65,19 @@ module RSpec
64
65
  end
65
66
  end
66
67
  end
68
+
69
+ it "has a backtrace line from the raw erb evaluation" do
70
+ Dir.chdir(root) do
71
+ actual_doc = Nokogiri::HTML(generated_html)
72
+
73
+ actual_doc.inner_html.should include('(erb):1')
74
+ end
75
+ end
76
+
77
+ it "has a backtrace line from a erb source file we forced to appear" do
78
+ generated_html.should include('open?url=file:///foo.html.erb')
79
+ end
80
+
67
81
  end
68
82
  end
69
83
  end
@@ -141,77 +141,40 @@ module RSpec
141
141
  end
142
142
 
143
143
  describe "file path" do
144
- it "finds the first spec file in the caller array" do
144
+ it "finds the first non-rspec lib file in the caller array" do
145
145
  m = Metadata.new
146
146
  m.process(:caller => [
147
- "foo",
148
- "#{__FILE__}:#{__LINE__}",
149
- "bar_spec.rb:23",
150
- "baz"
147
+ "./lib/rspec/core/foo.rb",
148
+ "#{__FILE__}:#{__LINE__}"
151
149
  ])
152
150
  m[:example_group][:file_path].should == __FILE__
153
151
  end
154
-
155
- it "finds the first spec file in the caller array with drive letter" do
156
- m = Metadata.new
157
- m.process(:caller => [
158
- "foo",
159
- "C:/path/file_spec.rb:#{__LINE__}",
160
- "bar_spec.rb:23",
161
- "baz"
162
- ])
163
- m[:example_group][:file_path].should == "C:/path/file_spec.rb"
164
- end
165
-
166
- it "is nil if there are no spec files found", :full_backtrace => true do
167
- m = Metadata.new
168
- m.process(:caller => [
169
- "foo",
170
- "metadata_example.rb:#{__LINE__}",
171
- "baz"
172
- ])
173
- m[:example_group][:file_path].should be_nil
174
- end
175
152
  end
176
153
 
177
154
  describe "line number" do
178
- it "finds the line number with the first spec file in the backtrace" do
155
+ it "finds the line number with the first non-rspec lib file in the backtrace" do
179
156
  m = Metadata.new
180
- m.process(:caller => [
181
- "foo",
182
- "#{__FILE__}:#{__LINE__}",
183
- "bar_spec.rb:23",
184
- "baz"
185
- ])
186
- m[:example_group][:line_number].should == __LINE__ - 4
157
+ m.process({})
158
+ m[:example_group][:line_number].should == __LINE__ - 1
187
159
  end
160
+
188
161
  it "finds the line number with the first spec file with drive letter" do
189
162
  m = Metadata.new
190
- m.process(:caller => [
191
- "foo",
192
- "C:/path/to/file_spec.rb:#{__LINE__}",
193
- "bar_spec.rb:23",
194
- "baz"
195
- ])
196
- m[:example_group][:line_number].should == __LINE__ - 4
163
+ m.process(:caller => [ "C:/path/to/file_spec.rb:#{__LINE__}" ])
164
+ m[:example_group][:line_number].should == __LINE__ - 1
197
165
  end
166
+
198
167
  it "uses the number after the first : for ruby 1.9" do
199
168
  m = Metadata.new
200
- m.process(:caller => [
201
- "foo",
202
- "#{__FILE__}:#{__LINE__}:999",
203
- "bar_spec.rb:23",
204
- "baz"
205
- ])
206
- m[:example_group][:line_number].should == __LINE__ - 4
169
+ m.process(:caller => [ "#{__FILE__}:#{__LINE__}:999" ])
170
+ m[:example_group][:line_number].should == __LINE__ - 1
207
171
  end
208
172
  end
209
173
 
210
174
  describe "metadata for example" do
211
- let(:caller_for_example) { caller(0) }
212
- let(:line_number) { __LINE__ - 1 }
213
175
  let(:metadata) { Metadata.new.process("group description") }
214
- let(:mfe) { metadata.for_example("example description", {:caller => caller_for_example, :arbitrary => :options}) }
176
+ let(:mfe) { metadata.for_example("example description", {:arbitrary => :options}) }
177
+ let(:line_number) { __LINE__ - 1 }
215
178
 
216
179
  it "stores the description" do
217
180
  mfe[:description].should == "example description"
@@ -225,10 +188,6 @@ module RSpec
225
188
  mfe[:execution_result].should == {}
226
189
  end
227
190
 
228
- it "stores the caller" do
229
- mfe[:caller].should == caller_for_example
230
- end
231
-
232
191
  it "extracts file path from caller" do
233
192
  mfe[:file_path].should == __FILE__
234
193
  end
@@ -35,6 +35,39 @@ describe "an example" do
35
35
  end
36
36
  end
37
37
 
38
+ context "with no docstring" do
39
+ context "declared with the pending method" do
40
+ it "does not have an auto-generated description" do
41
+ group = RSpec::Core::ExampleGroup.describe('group') do
42
+ it "checks something" do
43
+ (3+4).should == 7
44
+ end
45
+ pending do
46
+ "string".reverse.should == "gnirts"
47
+ end
48
+ end
49
+ example = group.examples.last
50
+ example.run(group.new, stub.as_null_object)
51
+ example.description.should be_empty
52
+ end
53
+ end
54
+ context "after another example with some assertion" do
55
+ it "does not show any message" do
56
+ group = RSpec::Core::ExampleGroup.describe('group') do
57
+ it "checks something" do
58
+ (3+4).should == 7
59
+ end
60
+ specify do
61
+ pending
62
+ end
63
+ end
64
+ example = group.examples.last
65
+ example.run(group.new, stub.as_null_object)
66
+ example.description.should be_empty
67
+ end
68
+ end
69
+ end
70
+
38
71
  context "with a message" do
39
72
  it "is listed as pending with the supplied message" do
40
73
  group = RSpec::Core::ExampleGroup.describe('group') do
@@ -1,6 +1,5 @@
1
1
  # Deliberately named _specs.rb to avoid being loaded except when specified
2
2
 
3
-
4
3
  describe "pending spec with no implementation" do
5
4
  it "is pending"
6
5
  end
@@ -34,3 +33,22 @@ describe "failing spec" do
34
33
  1.should eq(2)
35
34
  end
36
35
  end
36
+
37
+ describe "a failing spec with odd backtraces" do
38
+ it "fails with a backtrace that has no file" do
39
+ require 'erb'
40
+
41
+ ERB.new("<%= raise 'foo' %>").result
42
+ end
43
+
44
+ it "fails with a backtrace containing an erb file" do
45
+ e = Exception.new
46
+
47
+ def e.backtrace
48
+ ["/foo.html.erb:1:in `<main>': foo (RuntimeError)",
49
+ " from /lib/ruby/1.9.1/erb.rb:753:in `eval'"]
50
+ end
51
+
52
+ raise e
53
+ end
54
+ end