5

I'm just getting into autotest and i have the following problem.

How do I get autotest to print stack traces on errors. If i run "rake spec" i get output

  4) Transaction should get date with poor form
 Failure/Error: transaction = Transaction.build_from_email(@email)
 NoMethodError:
   private method `gsub' called for 112:Fixnum
 # ./app/models/transaction.rb:46:in `build_from_email'
 # ./spec/models/transaction_spec.rb:104

but i get the following with autotest

  4) Transaction should get date with poor form
 Failure/Error: transaction = Transaction.build_from_email(@email)
 NoMethodError:
   private method `gsub' called for 112:Fixnum

Would just be alot easier to find where the error is.

Thanks a bunch

mlihp
  • 485
  • 4
  • 12

1 Answers1

10

If you're using RSpec 2 you can add a file called .rspec in the project root with this content:

--backtrace

RSpec will read this file when it's run, whether it's through Rake or Autotest.

Theo
  • 131,503
  • 21
  • 160
  • 205
  • is there any way to run this on-demand, for the first failing test, from the guard console? – Magne Jan 29 '13 at 13:03