From e94403ca28676acfa6701fb21fa69d39cda255ab Mon Sep 17 00:00:00 2001 From: Peter Gumeson Date: Thu, 11 Jun 2009 23:34:02 -0700 Subject: [PATCH] Added a spec for saving a casted array --- spec/couchrest/more/casted_model_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/couchrest/more/casted_model_spec.rb b/spec/couchrest/more/casted_model_spec.rb index 029e294..a1bbc43 100644 --- a/spec/couchrest/more/casted_model_spec.rb +++ b/spec/couchrest/more/casted_model_spec.rb @@ -209,6 +209,10 @@ describe CouchRest::CastedModel do toy = CatToy.new :name => "Mouse" @cat.toys.push(toy) @cat.save.should be_true + @cat = Cat.get @cat.id + @cat.toys.class.should == CastedArray + @cat.toys.first.class.should == CatToy + @cat.toys.first.should === toy end it "should fail because name is not present" do