<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,10 +2,14 @@ require File.expand_path(File.dirname(__FILE__) + '&lt;%= '/..' * class_nesting_dep
 
 describe &lt;%= class_name %&gt; do
   before(:each) do
-    @&lt;%= file_name %&gt; = &lt;%= class_name %&gt;.new
+    @valid_attributes = {
+&lt;% attributes.each_with_index do |attribute, attribute_index| -%&gt;
+      :&lt;%= attribute.name %&gt; =&gt; &lt;%= attribute.default_value %&gt;&lt;%= attribute_index == attributes.length - 1 ? '' : ','%&gt;
+&lt;% end -%&gt;
+    }
   end
 
-  it &quot;should be valid&quot; do
-    @&lt;%= file_name %&gt;.should be_valid
+  it &quot;should create a new instance given valid attributes&quot; do
+    &lt;%= class_name %&gt;.create!(@valid_attributes)
   end
 end</diff>
      <filename>generators/rspec_model/templates/model_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>914abe02b183e5f76365c1ba75b91fd600b07c16</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/abcffab8b13a41956b82dc7672ccfa8b34b9e553</url>
  <id>abcffab8b13a41956b82dc7672ccfa8b34b9e553</id>
  <committed-date>2008-06-28T10:21:22-07:00</committed-date>
  <authored-date>2008-06-28T10:21:22-07:00</authored-date>
  <message>update model spec template (generator)</message>
  <tree>14dff441a615194a0f163c03e2cca4acf80a2227</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
