search for: collections_to_populate

Displaying 1 result from an estimated 1 matches for "collections_to_populate".

2007 May 15
3
nested blocks
...wing code results in the error that follows? I also would value any criticisms of my approach (i.e., defining it_should_populate_collections). Thanks -Chris #Code def it_should_populate_collections(condition=nil) it "should populate any necessary collections #{condition}" do [*@collections_to_populate].each do |collection| collection_model = collection.to_s.classify.constantize collection_model.should_receive(:find).with(:all).and_return("the #{collection}") end yield [*@collections_to_populate].each do |collection| assigns[collection].should == "the...