<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -42,3 +42,5 @@ Spec::Rake::SpecTask.new('spec') do |t|
   t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--colour&quot;]
   t.spec_files = Pathname.glob(Pathname.new(__FILE__).parent.join(&quot;spec&quot;).join(&quot;**&quot;).join(&quot;*_spec.rb&quot;))
 end
+
+task :default =&gt; ['spec']
\ No newline at end of file</diff>
      <filename>dm-validations/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module DataMapper
       end
       
       def call(target)
-        includes = @options[:set].include?(target.instance_variable_get(&quot;@#{@field_name}&quot;))
+        includes = @options[:set].include?(target.attribute_get(field_name))
         return true if includes    
         
         s = ''</diff>
      <filename>dm-validations/lib/dm-validations/within_validator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -823,6 +823,13 @@ end
         property :type_of_number, String, :auto_validation =&gt; false   
         validates_within :type_of_number, :set =&gt; ['Home','Work','Cell']   
       end
+      
+      class Reciever
+        include DataMapper::Resource
+        include DataMapper::Validate
+        property :holder, String, :auto_validation =&gt; false, :default =&gt; 'foo'
+        validates_within :holder, :set =&gt; ['foo', 'bar', 'bang']
+      end
     end
     
     it &quot;should validate a value on an instance of a resource within a predefined set of values&quot; do
@@ -833,6 +840,11 @@ end
       tel.type_of_number = 'Cell'
       tel.valid?.should == true
     end
+    
+    it &quot;should validate a value by it's default&quot; do
+      tel = Reciever.new
+      tel.should be_valid
+    end
   end  
 
   #-------------------------------------------------------------------------------</diff>
      <filename>dm-validations/spec/validation_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b3da5cd121ad16e4763dbd4cdc51cb53ed49988f</id>
    </parent>
  </parents>
  <author>
    <name>Adam French</name>
    <email>adam@adam.wieck.com</email>
  </author>
  <url>http://github.com/sam/dm-more/commit/a55dc09669177299de9d8c6f9d4a67bc8e9db980</url>
  <id>a55dc09669177299de9d8c6f9d4a67bc8e9db980</id>
  <committed-date>2008-05-07T10:10:06-07:00</committed-date>
  <authored-date>2008-05-07T10:10:06-07:00</authored-date>
  <message>default task is spec. failing spec for [#257]. fix for [#257]</message>
  <tree>c54d16a93e1fb23913f71a2cd21298d1caa3f4b6</tree>
  <committer>
    <name>Adam French</name>
    <email>adam@adam.wieck.com</email>
  </committer>
</commit>
