Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use 5 decimal places for time reports in html formatter.

- also update formatter specs and gold masters
- #451
  • Loading branch information...
commit 79587d58e6f347db072619d2443523bb7a8e7b41 1 parent 001522b
David Chelimsky dchelimsky authored
6 lib/rspec/core/formatters/html_formatter.rb
View
@@ -67,7 +67,7 @@ def example_started(example)
def example_passed(example)
move_progress
- @output.puts " <dd class=\"example passed\"><span class=\"passed_spec_name\">#{h(example.description)}</span><span class='duration'>#{sprintf("%.3f", example.execution_result[:run_time])}s</span></dd>"
+ @output.puts " <dd class=\"example passed\"><span class=\"passed_spec_name\">#{h(example.description)}</span><span class='duration'>#{sprintf("%.5f", example.execution_result[:run_time])}s</span></dd>"
@output.flush
end
@@ -84,7 +84,7 @@ def example_failed(example)
move_progress
@output.puts " <dd class=\"example #{failure_style}\">"
@output.puts " <span class=\"failed_spec_name\">#{h(example.description)}</span>"
- @output.puts " <span class=\"duration\">#{sprintf('%.1f', example.execution_result[:run_time])}s</span>"
+ @output.puts " <span class=\"duration\">#{sprintf('%.5f', example.execution_result[:run_time])}s</span>"
@output.puts " <div class=\"failure\" id=\"failure_#{@failed_examples.size}\">"
@output.puts " <div class=\"message\"><pre>#{h(exception.message)}</pre></div>" unless exception.nil?
@output.puts " <div class=\"backtrace\"><pre>#{format_backtrace(exception.backtrace, example).join("\n")}</pre></div>" if exception
@@ -143,7 +143,7 @@ def dump_summary(duration, example_count, failure_count, pending_count)
totals << "#{failure_count} failure#{'s' unless failure_count == 1}"
totals << ", #{pending_count} pending" if pending_count > 0
end
- @output.puts "<script type=\"text/javascript\">document.getElementById('duration').innerHTML = \"Finished in <strong>#{duration} seconds</strong>\";</script>"
+ @output.puts "<script type=\"text/javascript\">document.getElementById('duration').innerHTML = \"Finished in <strong>#{sprintf("%.5f", duration)} seconds</strong>\";</script>"
@output.puts "<script type=\"text/javascript\">document.getElementById('totals').innerHTML = \"#{totals}\";</script>"
@output.puts "</div>"
@output.puts "</div>"
14 spec/rspec/core/formatters/html_formatted-1.8.7.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,6 +316,7 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -374,6 +382,7 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1</pre></div>
@@ -383,6 +392,7 @@
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre>/foo.html.erb:1:in `<main>': foo (RuntimeError)</pre></div>
@@ -391,7 +401,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
14 spec/rspec/core/formatters/html_formatted-1.9.2.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,6 +316,7 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -374,6 +382,7 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1:in `<main>'
@@ -390,6 +399,7 @@
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre>/foo.html.erb:1:in `<main>': foo (RuntimeError)</pre></div>
@@ -398,7 +408,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
14 spec/rspec/core/formatters/html_formatted-1.9.3.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,6 +316,7 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -374,6 +382,7 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1:in `<main>'
@@ -390,6 +399,7 @@
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre>/foo.html.erb:1:in `<main>': foo (RuntimeError)</pre></div>
@@ -398,7 +408,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
2  spec/rspec/core/formatters/html_formatter_spec.rb
View
@@ -22,7 +22,7 @@ module Formatters
err, out = StringIO.new, StringIO.new
command_line = RSpec::Core::CommandLine.new(options)
command_line.run(err, out)
- out.string.gsub(/\d+\.\d+ seconds/, 'x seconds')
+ out.string.gsub(/\d+\.\d+(s| seconds)/, "n.nnnn\\1")
end
let(:expected_html) do
34 spec/rspec/core/formatters/text_mate_formatted-1.8.7.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,15 +316,16 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<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>
<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>
-<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>
-<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'
-<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>
-<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'
-<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>
+<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>
+<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 `open'
+<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>
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> </pre></div>
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">&quot;</span><span class="string">with content that would pass</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -352,11 +360,11 @@
</pre></div>
<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>
<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>
-<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>
-<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'
-<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>
-<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'
-<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>
+<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>
+<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 `open'
+<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>
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> </pre></div>
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">&quot;</span><span class="string">failing spec</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
@@ -374,6 +382,7 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1</pre></div>
@@ -383,6 +392,7 @@
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre><a href="txmt://open?url=file:///foo.html.erb&line=1">/foo.html.erb:1</a> :in `&lt;main&gt;': foo (RuntimeError)</pre></div>
@@ -391,7 +401,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
44 spec/rspec/core/formatters/text_mate_formatted-1.9.2.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,15 +316,16 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<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> :in `block (3 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">&quot;</span><span class="string">with content that would pass</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -352,11 +360,11 @@
</pre></div>
<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> :in `block (2 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">&quot;</span><span class="string">failing spec</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
@@ -374,22 +382,24 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1:in `&lt;main&gt;'
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=41">./spec/rspec/core/resources/formatter_specs.rb:41</a> :in `block (2 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre><a href="txmt://open?url=file:///foo.html.erb&line=1">/foo.html.erb:1</a> :in `&lt;main&gt;': foo (RuntimeError)</pre></div>
@@ -398,7 +408,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
44 spec/rspec/core/formatters/text_mate_formatted-1.9.3.html
View
@@ -155,6 +155,12 @@
padding: 3px 3px 3px 18px;
}
+dd .duration {
+ padding-left: 5px;
+ text-align: right;
+ right: 0px;
+ float:right;
+}
dd.example.passed {
border-left: 5px solid #65C400;
@@ -310,15 +316,16 @@
<script type="text/javascript">moveProgressBar('42.8');</script>
<dd class="example pending_fixed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_1">
<div class="message"><pre>RSpec::Core::PendingExampleFixedError</pre></div>
<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> :in `block (3 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">&quot;</span><span class="string">with content that would pass</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
@@ -332,7 +339,7 @@
<dl style="margin-left: 0px;">
<dt id="example_group_5" class="passed">passing spec</dt>
<script type="text/javascript">moveProgressBar('57.1');</script>
- <dd class="example passed"><span class="passed_spec_name">passes</span></dd>
+ <dd class="example passed"><span class="passed_spec_name">passes</span><span class='duration'>n.nnnns</span></dd>
</dl>
</div>
<div id="div_group_6" class="example_group passed">
@@ -343,6 +350,7 @@
<script type="text/javascript">moveProgressBar('71.4');</script>
<dd class="example failed">
<span class="failed_spec_name">fails</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_2">
<div class="message"><pre>
expected: 2
@@ -352,11 +360,11 @@
</pre></div>
<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> :in `block (2 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">&quot;</span><span class="string">failing spec</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">fails</span><span class="punct">&quot;</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
@@ -374,22 +382,24 @@
<script type="text/javascript">moveProgressBar('85.7');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace that has no file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_3">
<div class="message"><pre>foo</pre></div>
<div class="backtrace"><pre>(erb):1:in `&lt;main&gt;'
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/resources/formatter_specs.rb&line=41">./spec/rspec/core/resources/formatter_specs.rb:41</a> :in `block (2 levels) in &lt;top (required)&gt;'
<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> :in `block (2 levels) in &lt;module:Formatters&gt;'
-<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 `block (5 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (4 levels) in &lt;module:Formatters&gt;'
-<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'
-<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 `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
+<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 `block (5 levels) in &lt;module:Formatters&gt;'
+<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 `open'
+<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 `block (4 levels) in &lt;module:Formatters&gt;'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `chdir'
+<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec2/repos/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&line=45">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in &lt;module:Formatters&gt;'</pre></div>
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="example failed">
<span class="failed_spec_name">fails with a backtrace containing an erb file</span>
+ <span class="duration">n.nnnns</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Exception</pre></div>
<div class="backtrace"><pre><a href="txmt://open?url=file:///foo.html.erb&line=1">/foo.html.erb:1</a> :in `&lt;main&gt;': foo (RuntimeError)</pre></div>
@@ -398,7 +408,7 @@
</dd>
</dl>
</div>
-<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
+<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>n.nnnn seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "7 examples, 4 failures, 2 pending";</script>
</div>
</div>
3  spec/rspec/core/formatters/text_mate_formatter_spec.rb
View
@@ -22,8 +22,7 @@ module Formatters
err, out = StringIO.new, StringIO.new
command_line = RSpec::Core::CommandLine.new(options)
command_line.run(err, out)
- out.string.gsub(/\d+\.\d+ seconds/, 'x seconds')
-
+ out.string.gsub(/\d+\.\d+(s| seconds)/, "n.nnnn\\1")
end
let(:expected_html) do
Please sign in to comment.
Something went wrong with that request. Please try again.