Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning my first RSpec test, is there any way to print just the error with no backtrace?
    primarykey
    data
    text
    <p>I'm looking at this tutorial online: <a href="https://www.relishapp.com/rspec/docs/gettingstarted" rel="nofollow">https://www.relishapp.com/rspec/docs/gettingstarted</a></p> <pre><code># game_spec.rb describe Game do describe "#score" do it "returns 0 for all gutter game" do game = Game.new 20.times { game.roll(0) } game.score.should == 0 end end end </code></pre> <p>Running the first example, I noticed that the error message they list is much shorter than what I'm seeing. On my terminal the stack trace is so long it scrolls off the top. Is there any way to shorter error message / stack output to make this fit?</p> <pre><code>/testspec/game_spec.rb:3:in `&lt;top (required)&gt;': uninitialized constant Game (NameError) from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `load' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `block in load_spec_files' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `each' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `load_spec_files' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb:22:in `run' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:80:in `run' from /.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:17:in `block in autorun' </code></pre> <p>I stripped my home dir from the list of dirs there. Is it possible to order verbosity down to simply the NameError line?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload