Frederick C. wrote in post #1087442:
On Dec 1, 11:40am, Jordon B. [email protected] wrote:
On Sat, Dec 1, 2012 at 9:29 AM, Frederick C.
[email protected] wrote:
Rails doesn’t use rspec. It uses minitest (which is what test::unit is
on 1.9). I don’t think it has an equivalent fail fast option although
there do appear to be some monkey patches floating around
What has what Rails uses to do with what you use personally?
Because it looks to me like they are trying to run the active record
test suite against their database driver (the schema used in the error
messages matches one of the tables used in the active record tests.
Yes, I am trying to run the test suite against our new driver. So this
may not be your conventional “run your own app tests with ruby rails”
scenario, this is a “run the RoR AR Adapter compliance tests” to see if
our adapter is up to snuff sort of scenario.
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
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)
- very little documentation in the README or RUNNING TESTS doc for folks
authoring an adapter (few to none of the necessary hooks are documented)
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!”.