On Fri, Sep 5, 2008 at 7:23 AM, Mark Wilden <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 5, 2008 at 7:08 AM, Greg Hauptmann
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> In cases where I have model methods that are generating data based on
>> non-trivial SQL queries to a database (e.g. to pull together data
>> required to plot an appropriate graph), does this really require a
>> traditional fixture (i.e. pre-canned test data) as opposed to use of
>> mocks?
>
> I don't see how you could use mocks to test SQL. You need rows in the
> database to do this. I personally do not use fixtures because my model specs
> usually don't use a "typical" data set. I'll create my own data set for each
> type of spec, often using an object mother to create the valid network of
> objects.

+1
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to