On Dec 2, 9:21 am, Robert Buck <li...@ruby-forum.com> wrote:
>
> I think this is in the RoR test fixture code, and I see some places
> where it goes out of its way to deliberately eat STDOUT and STDERR
> during tests, and I would guess it similarly eats information on the
> rescue exception front.
>
> From my experience, where we use RSpec exclusively, one of the
> attractive things about it is that it does NOT run in buffered mode for
> STDOUT/STDERR, rather you see the blow-by-blow. Beyond the immediately
> obvious, it also provides you with all the line numbers where bad things
> happen so that you can immediately add breakpoints to the sources at the
> right places rather than resorting to a binary search (spelunking)
> through the code.
>
> I see other projects do the same thing, and have very excellent test
> suites. So I am a bit surprised at the way the RoR test suite was
> written.
>
> So I am sure you can hear what my gripes are:
>
> - no line numbers or stack trace info when bad things happen
> - no unbuffered output, and it eats my C extension trace info (printf)
You do normally get those. I seem to recall that logging (and perhaps
stdout) is silenced during fixture insertion because normally it
creates a lot of noise. You could try hobbling that silencing - all
the code relating to fixtures is in a file called fixtures.rb, if my
memory correct.
You should also be getting backtraces but if the exception is being
throw outside of the test case itself, weird stuff can happen (I've
had similar experiences with rspec in that sort of scenario) and it
ends up being handled differently to a normal test failure.
> - very little documentation in the README or RUNNING TESTS doc for folks
> authoring an adapter (few to none of the necessary hooks are documented)
>
You can usually find some knowledgable people on #rails-contrib
although writing database adapters from scratch isn't something that
many have done.
Fred
> If folks have specific links to documentation on how to hack the RoR
> test suite to do the right thing, diffs preferred, I'd appreciate it.
>
> I hobble along with this, but I just wanted to be one voice calling out
> from the wilderness, "have mercy!".
>
> --
> Posted viahttp://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 https://groups.google.com/groups/opt_out.
No comments:
Post a Comment