spec/ref_spec.rb in blendris-0.5 vs spec/ref_spec.rb in blendris-0.6
- old
+ new
@@ -33,8 +33,17 @@
@vegetable.foods.count.should == 1
@vegetable.foods.first.should == @onion
@fruit.foods.count.should == 0
@onion.category.should == @vegetable
+ @vegetable.foods = [ @apple, @lemon, @lemon ]
+ @vegetable.foods << @apple
+ @vegetable.foods.count.should == 2
+ @vegetable.foods.should be_include @apple
+ @vegetable.foods.should be_include @lemon
+ @apple.category.should == @vegetable
+ @lemon.category.should == @vegetable
+ @onion.category.should == nil
+
end
end