Hey,

I trying to get a backtrace with rspec but I can't get it working for
some reason.

This is the test file:
require 'spec_helper'

describe ActivityReport do
it "should create a new instance given valid attributes" do
activity = Factory(:activity_report)
end
end

This is the command I run:
rspec --backtrace spec/models/activity_report_spec.rb

And this is what I get:
No examples matched {:focus=>true}. Running all.

ActivityReport
should create a new instance given valid attributes (FAILED - 1)

Failures:

1) ActivityReport should create a new instance given valid attributes
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
#
/Users/pbartels/.rvm/gems/ruby-1.9.2-p290@brothelking/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:206

Finished in 40.76 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/models/activity_report_spec.rb:16 # ActivityReport should
create a new instance given valid attributes

My .rspec:
--format nested
--color
--drb
--backtrace

And my RSpec part in spec_helper.rb:
RSpec.configure do |config|
config.mock_with :rspec

config.use_transactional_fixtures = true

config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run :focus => true
config.run_all_when_everything_filtered = true

config.backtrace_clean_patterns = [
/\/lib\d*\/ruby\//,
/bin\//,
#/gems/,
/spec\/spec_helper\.rb/,
/lib\/rspec\/(core|expectations|matchers|mocks)/
]
end

I tried it with and without "backtrace_clean_patterns".

Anyone knows what's wrong here?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 5, '11 at 8:58p
activeDec 5, '11 at 8:58p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Heinz Strunk: 1 post

People

Translate

site design / logo © 2021 Grokbase