Rspec stack trace on autotest

I just go into autotest and I have the following problem.

How to get autotest for printing stack traces in case of errors. If I run "rake spec", I get the 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 

It would be much easier to find where the error is.

Thanks a bunch

+4
source share
1 answer

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

 --backtrace 

RSpec will read this file when it is launched, whether it is run through Rake or Autotest.

+9
source

Source: https://habr.com/ru/post/1336650/


All Articles