When my specs hit an error, I get a message like this:
Vendor should reject duplicate names
Failure/Error: user_with_duplicate_email.should_not be_valid
In spec_helper.rb
you can filter backtrace using the following code snippet:
RSpec.configure do |config|
# RSpec automatically cleans stuff out of backtraces;
# sometimes this is annoying when trying to debug something e.g. a gem
# RSpec 3:
# config.backtrace_exclusion_patterns = [
# RSpec 2:
config.backtrace_clean_patterns = [
/\/lib\d*\/ruby\//,
/bin\//,
/gems/,
/spec\/spec_helper\.rb/,
/lib\/rspec\/(core|expectations|matchers|mocks)/
]
end
I updated it to work with with Rspec 3.2.3. In spec_helper.rb
put:
RSpec.configure do |config|
config.backtrace_exclusion_patterns = [
/\/lib\d*\/ruby\//,
/bin\//,
/gems/,
/spec\/spec_helper\.rb/,
/lib\/rspec\/(core|expectations|matchers|mocks)/
]
end
This is pure gold. Thank you luacassus!