[rspec-users] Is there an equivalent to anything() for Hash parameters?

Doug Livesey lists at ruby-forum.com
Fri May 23 05:56:11 EDT 2008


Hi -- is there an equivalent to the anything() method to use with Hash
parameters?
So that the following call:
  Model.find( :all, :conditions => "name LIKE '%rt%'", :order => 'name'
)

Could have the two following successful examples:
  Model.should_receive( :find ).with( :all, { :conditions => "name LIKE
'%rt%", anything } )
  Model.should_receive( :find ).with( :all, { anything, :order => 'name'
} )

If anyone knew a way of generating that sort of behaviour, I'd be *very*
grateful!
Cheers,
   Doug.
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list