RSpec results

# RSpec Code Examples

Passed Failed Pending

pending spec with no implementation
  is pending (PENDING: Not yet implemented)

pending command with block format

with content that would fail
  is pending (PENDING: No reason given)

with content that would pass
  fails n.nnnns

      RSpec::Core::Pending::PendingExampleFixedError

      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/resources/formatter_specs.rb&amp;line=18">./spec/rspec/core/resources/formatter_specs.rb:18</a> :in `__script__'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=33">./spec/support/sandboxed_mock_space.rb:33</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=72">./spec/support/sandboxed_mock_space.rb:72</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=32">./spec/support/sandboxed_mock_space.rb:32</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/hash19.rb&amp;line=256">kernel/common/hash19.rb:256</a> :in `fetch'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/io.rb&amp;line=217">kernel/common/io.rb:217</a> :in `open'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/dir.rb&amp;line=92">kernel/common/dir.rb:92</a> :in `chdir'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=58">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:58</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=38">./spec/support/sandboxed_mock_space.rb:38</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=103">kernel/common/eval19.rb:103</a> :in `instance_exec'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=698">kernel/loader.rb:698</a> :in `run_at_exits'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=718">kernel/loader.rb:718</a> :in `epilogue'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=851">kernel/loader.rb:851</a> :in `main'

      16  context "with content that would pass" do
      17    it "fails" do
      18      pending do
      19        expect(1).to eq(1)
      20      end

passing spec
  passesn.nnnns

failing spec
  fails n.nnnns

      expected: 2
           got: 1

      (compared using ==)

      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/resources/formatter_specs.rb&amp;line=33">./spec/rspec/core/resources/formatter_specs.rb:33</a> :in `__script__'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=33">./spec/support/sandboxed_mock_space.rb:33</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=72">./spec/support/sandboxed_mock_space.rb:72</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=32">./spec/support/sandboxed_mock_space.rb:32</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/hash19.rb&amp;line=256">kernel/common/hash19.rb:256</a> :in `fetch'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/io.rb&amp;line=217">kernel/common/io.rb:217</a> :in `open'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/dir.rb&amp;line=92">kernel/common/dir.rb:92</a> :in `chdir'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=58">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:58</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=38">./spec/support/sandboxed_mock_space.rb:38</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=103">kernel/common/eval19.rb:103</a> :in `instance_exec'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=698">kernel/loader.rb:698</a> :in `run_at_exits'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=718">kernel/loader.rb:718</a> :in `epilogue'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=851">kernel/loader.rb:851</a> :in `main'

      31describe "failing spec" do
      32  it "fails" do
      33    expect(1).to eq(2)
      34  end
      35end

a failing spec with odd backtraces
  fails with a backtrace that has no file n.nnnns

      foo

      (erb):1:in `__script__'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/block_environment.rb&amp;line=75">kernel/common/block_environment.rb:75</a> :in `call_on_instance'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval.rb&amp;line=75">kernel/common/eval.rb:75</a> :in `eval'
      <a href="txmt://open?url=file:///Users/jon/.rvm/rubies/rbx-head/lib/19/erb.rb&amp;line=838">/Users/jon/.rvm/rubies/rbx-head/lib/19/erb.rb:838</a> :in `result'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/resources/formatter_specs.rb&amp;line=41">./spec/rspec/core/resources/formatter_specs.rb:41</a> :in `__script__'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=33">./spec/support/sandboxed_mock_space.rb:33</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=72">./spec/support/sandboxed_mock_space.rb:72</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=32">./spec/support/sandboxed_mock_space.rb:32</a> :in `run'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=37">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:37</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/hash19.rb&amp;line=256">kernel/common/hash19.rb:256</a> :in `fetch'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/io.rb&amp;line=217">kernel/common/io.rb:217</a> :in `open'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=59">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:59</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/dir.rb&amp;line=92">kernel/common/dir.rb:92</a> :in `chdir'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/rspec/core/formatters/text_mate_formatter_spec.rb&amp;line=58">./spec/rspec/core/formatters/text_mate_formatter_spec.rb:58</a> :in `Formatters'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=45">kernel/common/eval19.rb:45</a> :in `instance_eval'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/spec/support/sandboxed_mock_space.rb&amp;line=38">./spec/support/sandboxed_mock_space.rb:38</a> :in `sandboxed'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/common/eval19.rb&amp;line=103">kernel/common/eval19.rb:103</a> :in `instance_exec'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/array19.rb&amp;line=18">kernel/bootstrap/array19.rb:18</a> :in `map'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/bootstrap/proc.rb&amp;line=22">kernel/bootstrap/proc.rb:22</a> :in `call'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=698">kernel/loader.rb:698</a> :in `run_at_exits'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=718">kernel/loader.rb:718</a> :in `epilogue'
      <a href="txmt://open?url=file:///Users/jon/Code/Scratch/rspec-core/kernel/loader.rb&amp;line=851">kernel/loader.rb:851</a> :in `main'

      -1# Couldn't get snippet for (erb)

  fails with a backtrace containing an erb file n.nnnns

      Exception

      <a href="txmt://open?url=file:///foo.html.erb&amp;line=1">/foo.html.erb:1</a> :in `&lt;main&gt;': foo (RuntimeError)

      -1# Couldn't get snippet for /foo.html.erb