spec/attributes_spec.rb in simple_model-1.0.1 vs spec/attributes_spec.rb in simple_model-1.1.0
- old
+ new
@@ -73,5 +73,20 @@
union = methods | [:test, :test=, :test?]
union.should eql(methods)
end
end
+describe SimpleModel::Attributes, 'has_attributes' do
+ before(:all) do
+ class TestBoolean
+ include SimpleModel::Attributes
+ has_attributes :my_array, :default => []
+ end
+ end
+
+ it "should allow default value to be an empty array" do
+ test = TestBoolean.new
+ test.my_array.should eql([])
+ end
+
+end
+