Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: > >>>> ...so shouldn't the spec fail if we're returning all the users fixtures >>> which is true. [1,2,3] is not an element of the array [1,2,3]. I used >> description); >> re

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: > >>> >> (which it doesn't, therefore suggesting the spec is broken); >>def do_get >> ThinkingSphinx::Search.stub!(:search).and_return(users) >> get :people, :search

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: >> >> respond_to do |format| >> format.html >> format.xml { render :xml => @results } >> end >> end >> >> Cheers > > You're stubbing User.se

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
David Chelimsky wrote: > On Wed, Oct 1, 2008 at 2:33 AM, Neil Cauldwell <[EMAIL PROTECTED]> > wrote: >>> Also, what is your data? The matcher may not work as expected due to >> describe "handling GET /searches/people" do >> >> it "should

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Ben Mabey wrote: > Pat Maddox wrote: >>> >> ___ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > > Also, what is your data? The matcher may not work as expected due to > nuances in

[rspec-users] Spec for 'an array should not include an item'

2008-09-30 Thread Neil Cauldwell
Does anyone know how I can write a spec along the lines of this (but a working implementation); it "should not include inactive users" do do_get assigns[:results].should_not include(users(:inactive_user)) end I'm a newbie so I'm not capable of explaining why it doesn't work, but h

Re: [rspec-users] Testing file attachment with Paperclip

2008-09-06 Thread Neil Cauldwell
Rick Denatale wrote: > On Mon, Jun 9, 2008 at 8:18 AM, Nicholas Wieland > <[EMAIL PROTECTED]> > wrote: > >>> >> >> I haven't been clear enough, my point is not to fake the file upload >> (there's also fixture_file_upload for that) but to fake the receiver, making >> it dumb enough to avoid perfor