Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rspec stack trace on autotest

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

like image 435
mlihp Avatar asked Jan 20 '23 16:01

mlihp


1 Answers

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.

like image 87
Theo Avatar answered Jan 25 '23 22:01

Theo