Avdi Grimm wrote:
== What
NullDB is a Rails database connection adapter that interprets common
database operations as no-ops. It is the Null Object pattern as
applied to database adapters.
[...]
== Why
NullDB is intended to assist in writing fast database-independant unit
tests for
Marnen Laibow-Koser wrote:
Avdi Grimm wrote:
== What
NullDB is a Rails database connection adapter that interprets common
database operations as no-ops. It is the Null Object pattern as
applied to database adapters.
[...]
== Why
NullDB is intended to assist in writing fast
I'm fairly new to unit testing and TDD, but I think I understand the
concept of what they're talking about here. The point is that if you are
writing to the database during unit tests, you're actually testing the
database adapter and abstraction layer, in this case: ActiveRecord, and
not
Eric Schmitt wrote:
Marnen,
I'm fairly new to unit testing and TDD,
I've been doing test-first development as long as I've been doing Rails
development, nearly 3 years. (Whether that means that I too am new to
unit testing is left as an exercise for the student.)
? but I think I
Marnen,
You make some interesting points... I think I still have a ton to learn
about unit testing and TDD best practices. I'm still just getting
started. Thanks for the info!
Warmest Regards,
Eric
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
1. Why are we suddenly discussing a two year old post here? Clue me in.
2. Myron Marsten is now the maintainer of NullDB. See
http://github.com/nulldb/nulldb
3. I'm not really interested in rehashing the arguments for NullDB.
Enough teams are happily using it that I had to transfer
Avdi Grimm wrote:
1. Why are we suddenly discussing a two year old post here? Clue me in.
My apologies! It appeared at the top of my list feed and I neglected to
check the date. I'm not sure why it appeared at the top of my feed.
[...]
But briefly, I'll say this: if you are including the
Marnen Laibow-Koser wrote:
And there's an argument to be made that since the AR framework is part
of an AR class, it must be respected -- and hit *some* state-preserving
DB-like thing -- to properly unit test an AR class.
This is the kind of muddling of concepts that I think Rails
Avdi Grimm wrote:
Marnen Laibow-Koser wrote:
And there's an argument to be made that since the AR framework is part
of an AR class, it must be respected -- and hit *some* state-preserving
DB-like thing -- to properly unit test an AR class.
This is the kind of muddling of concepts that I
Avdi Grimm wrote:
Ed Howland wrote:
Avdi,
This sounds like a cool idea. One question. Would the usage pattern
then be to use a mock/stub for the find methods and let the other save
methods fall though to the NullDB connector?
Yes, that's accurate. Check the documentation for the latest
10 matches
Mail list logo