Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#Class:0x25550a8

2007-08-24 Thread Zach Dennis
On 8/20/07, David Chelimsky [EMAIL PROTECTED] wrote: On 8/20/07, Zach Dennis [EMAIL PROTECTED] wrote: On 8/20/07, aslak hellesoy [EMAIL PROTECTED] wrote: Several problems here: First, rspec_scaffold must be given a *singularised* name, in your case 'product'. (This is Rails being

Re: [rspec-users] Keeping unit tests from hitting the DB

2007-08-24 Thread Jim Deville
On Aug 23, 2007, at 9:48 PM, Pat Maddox wrote: On 8/23/07, Jim Deville [EMAIL PROTECTED] wrote: As far as model specs go...I've been toying with the idea of splitting up non-db-reliant behavior specs from the specs that do require the database. When you want to specify behavior you can

Re: [rspec-users] Keeping unit tests from hitting the DB

2007-08-24 Thread Pat Maddox
On 8/24/07, Jim Deville [EMAIL PROTECTED] wrote: On Aug 23, 2007, at 9:48 PM, Pat Maddox wrote: On 8/23/07, Jim Deville [EMAIL PROTECTED] wrote: As far as model specs go...I've been toying with the idea of splitting up non-db-reliant behavior specs from the specs that do require the

Re: [rspec-users] testing behaviour or testing code?

2007-08-24 Thread David Chelimsky
On 8/24/07, Pat Maddox [EMAIL PROTECTED] wrote: On 8/24/07, David Chelimsky [EMAIL PROTECTED] wrote: describe Widget, class do it should provide a list of widgets sorted alphabetically do Widget.should_receive(:find).with(:order = name ASC) Widget.find_alphabetically end

Re: [rspec-users] testing behaviour or testing code?

2007-08-24 Thread David Chelimsky
On 8/24/07, Pat Maddox [EMAIL PROTECTED] wrote: On 8/24/07, David Chelimsky [EMAIL PROTECTED] wrote: On 8/24/07, Pat Maddox [EMAIL PROTECTED] wrote: On 8/24/07, David Chelimsky [EMAIL PROTECTED] wrote: describe Widget, class do it should provide a list of widgets sorted