mlihp
mlihp

Reputation: 485

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

Upvotes: 5

Views: 1616

Answers (1)

Theo
Theo

Reputation: 132862

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.

Upvotes: 10

Related Questions