I'm trying to match a string in a hash passed to :find using a regular expression since I don't want to know all the other details of the :conditions passed to find. I've tried variations on the following with no success, e.g., not using hash_including and putting both hashes into a single hash_include.
c = /.*a.snapshot_id = 1.*/ SomeClass.should_receive(:find).with(:all, hash_including(:conditions=>c), hash_including(:include=>'')).and_return([mock_class]) The rspec fails with the following: expected: (:all, hash_including(:conditions=>/.*da.snapshot_id = 1.*/), hash_including(:include=>"")) got: (:all, {:conditions=>" a.snapshot_id = 1 OTHER CRITERIA... ", :include=>""}) _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users