This project is archived and is in readonly mode.
backtrace silencers are removing more lines than they really should
Reported by José Valim | March 26th, 2010 @ 11:38 PM | in 3.0.2
Whenever a test fails in Rails 3, application lines are also being silenced.
Comments and changes to this ticket
-
Ryan Bigg April 5th, 2010 @ 12:56 PM
I'm interested in seeing what the deal is with this ticket... could you post some information as to go about duplicating this issue?
-
José Valim April 5th, 2010 @ 01:19 PM
Hey Ryan,
I don't remember exactly, but try doing something invalid in your model, like:
class User < ActiveRecord::Base def explode nil.this_method_does_not_exist! end end
And then in a controller:
class HomeController < ApplicationController def index User.new.explode end end
The last time, the backtrace cleaner was removing all lines, include controllers and models. So it was quite hard to track the issue. You will need Ruby 1.8.7.
-
Ryan Bigg April 5th, 2010 @ 09:50 PM
In the latest edge on 1.8.7 I get this error:
1) Error: test_should_get_index(UsersControllerTest): NoMethodError: undefined method `this_method_does_not_exist!' for nil:NilClass app/models/user.rb:3:in `explode' app/controllers/users_controller.rb:5:in `index'
I think this is the correct stack, albeit missing the actual line of the test itself. I'm not a Test::Unit guy so I can't say for sure if that line should be there.
-
José Valim April 5th, 2010 @ 09:54 PM
Yeah, this is exactly the issue. It's missing the test lines (I just tried in Test::Unit and it does include test lines). You can also get the whole backtrace by uncommenting a line in config/initializers/backtrace_silencer.rb.
Thanks for looking into this. :)
-
José Valim April 5th, 2010 @ 10:10 PM
- State changed from new to open
- Assigned user set to José Valim
-
Repository April 5th, 2010 @ 11:23 PM
- State changed from open to resolved
(from [efa7e96821a3d335fab9cd9ed1dfa6c6cd6744a2]) It seems the test directory backtrace line is output with a / before it, thereby previously making it not match the regex. Support APP_DIRS that have backtrace lines maybe beginning with /. [#4277 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/efa7e96821a3d335fab9cd9ed1dfa6... -
upsale April 26th, 2011 @ 06:45 AM
There is no better way to show your support than with a messi jersey or messi short.
-
herve leger sale April 26th, 2011 @ 08:43 AM
However, high level of consumption in the city was higher than other regions, she left up to a hundred dollars per month without buying nothing. At the same time, when she looked around many students who wore very fashionably in their school, she wanted to imitate them.
But she knew she had no money,herve leger sale, when she is troubled by this issue, one of her classmates suggested that she would apply for deferment to the school, saying that her family was poor and used the school fees firstly. And her friend firmly believed that she would certainly pay off before graduation by doing part-time job. Samuel thought it was a good idea. Then laughed herself that there is no thought of her own.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 4277 backtrace silencers are removing more lines than they really should (from [efa7e96821a3d335fab9cd9ed1dfa6c6cd6744a2]) It seem...