<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/sanitized_file_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -169,6 +169,8 @@ If you want to only allow the upload of XHTML and XML files, so you can manipula
 
     upload_column :xml, :extensions =&gt; %w(xml html htm), :manipulator =&gt; MyXSLTProcessor
 
+	validate_integrity_of :xml
+
 You can also use some of Rails' validations with UploadColumn.
 
 validates_presence_of and validates_size_of have been verified to work. </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,22 @@ module UploadColumn
   EXTENSIONS = %w(asf avi css doc dvi gif gz html jpg js m3u mov mp3 mpeg odf pac pdf png ppt ps sig spl swf tar tar.gz torrent txt wav wax wm wma xbm xml xpm xsl xwd zip)
   IMAGE_EXTENSIONS = %w(jpg jpeg gif png)
   
+  DEFAULTS = {
+    :tmp_dir =&gt; 'tmp',
+    :store_dir =&gt; proc{ |r, f| f.attribute.to_s },
+    :root_dir =&gt; File.join(RAILS_ROOT, 'public'),
+    :get_content_type_from_file_exec =&gt; true,
+    :fix_file_extensions =&gt; false,
+    :web_root =&gt; nil,
+    :process =&gt; nil,
+    :permissions =&gt; 0644,
+    :extensions =&gt; UploadColumn::EXTENSIONS,
+    :web_root =&gt; '',
+    :manipulator =&gt; nil,
+    :versions =&gt; nil,
+    :validate_integrity =&gt; false
+  }
+  
   Column = Struct.new(:name, :options)
   
   private
@@ -36,8 +52,8 @@ module UploadColumn
     # [+store_dir+] Determines where the file will be stored permanently, you can pass a String or a Proc that takes the current instance and the attribute name as parameters, see the +README+ for detaills.
     # [+tmp_dir+] Determines where the file will be stored temporarily before it is stored to its final location, you can pass a String or a Proc that takes the current instance and the attribute name as parameters, see the +README+ for detaills.
     # [+old_files+] Determines what happens when a file becomes outdated. It can be set to one of &lt;tt&gt;:keep&lt;/tt&gt;, &lt;tt&gt;:delete&lt;/tt&gt; and &lt;tt&gt;:replace&lt;/tt&gt;. If set to &lt;tt&gt;:keep&lt;/tt&gt; UploadColumn will always keep old files, and if set to :delete it will always delete them. If it's set to :replace, the file will be replaced when a new one is uploaded, but will be kept when the associated object is deleted. Default to :delete.
-    # [+permissions+] Specify the Unix permissions to be used with UploadColumn. Defaults to 0644.
-    # [+root_path+] The root path where image will be stored, it will be prepended to store_dir and tmp_dir
+    # [+permissions+] Specify the Unix permissions to be used with UploadColumn. Defaults to 0644. Remember that permissions are usually counted in octal and that in Ruby octal numbers start with a zero, so 0644 != 644.
+    # [+root_dir+] The root path where image will be stored, it will be prepended to store_dir and tmp_dir
     # 
     # it also accepts the following, less common options:
     # [+web_root+] Prepended to all addresses returned by UploadColumn::UploadedFile.url
@@ -50,11 +66,13 @@ module UploadColumn
       
       # Add the accessor methods
       define_method name do
+        options = self.class.reflect_on_upload_columns[name].options #TODO: Spec this!
         @files ||= {}
         @files[name] ||= if self[name] then UploadedFile.retrieve(self[name], self, name, options) else nil end
       end
       
       define_method &quot;#{name}=&quot; do |file|
+        options = self.class.reflect_on_upload_columns[name].options
         @files ||= {}
         if file.nil?
           @files[name], self[name] = nil
@@ -72,6 +90,7 @@ module UploadColumn
       end
       
       define_method &quot;#{name}_temp=&quot; do |path|
+        options = self.class.reflect_on_upload_columns[name].options
         @files ||= {}
         return if path.nil? or path.empty?
         unless @files[name] and @files[name].new_file?
@@ -81,6 +100,32 @@ module UploadColumn
       end
     end
     
+    def image_column(name, options={})
+      options = options.merge(
+        :manipulator =&gt; UploadColumn::Manipulators::RMagick,
+        :root_dir =&gt; File.join(RAILS_ROOT, 'public', 'images'),
+        :web_root =&gt; '/images',
+        :extensions =&gt; UploadColumn::IMAGE_EXTENSIONS
+      )
+      upload_column(name, options)
+    end
+    
+    # Validates whether the images extension is in the array passed to :extensions.
+    # By default this is the UploadColumn::EXTENSIONS array
+    # 
+    # Use this to prevent upload of files which could potentially damage your system,
+    # such as executables or script files (.rb, .php, etc...).
+    def validates_integrity_of(*attr_names)
+      configuration = { :message =&gt; &quot;is not of a valid file type.&quot; }
+      configuration.update(attr_names.pop) if attr_names.last.is_a?(Hash)
+      
+      #attr_names.each { |name| self.reflect_on_upload_columns[name].options[:validate_integrity] = true }
+      
+      validates_each(attr_names, configuration) do |record, attr, column|
+        
+      end
+    end
+    
     # returns a hash of all UploadColumns defined on the model and their options.
     def reflect_on_upload_columns
       @upload_columns</diff>
      <filename>lib/upload_column/upload_column.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,16 +31,6 @@ module UploadColumn
   # See the +README+ for more detaills.
   class UploadedFile &lt; SanitizedFile
     
-    DEFAULTS = {
-      :tmp_dir =&gt; 'tmp',
-      :store_dir =&gt; proc{ |r, f| f.attribute.to_s },
-      :root_dir =&gt; File.join(RAILS_ROOT, 'public'),
-      :file_exec =&gt; 'file',
-      :fix_file_extensions =&gt; false,
-      :web_root =&gt; nil,
-      :process =&gt; nil
-    }
-    
     attr_reader :instance, :attribute, :options, :versions
     attr_accessor :suffix
     
@@ -67,7 +57,7 @@ module UploadColumn
     end
     
     def initialize(mode, file, instance, attribute, options={})
-      @options = DEFAULTS.merge(options)
+      @options = options.reverse_merge(UploadColumn::DEFAULTS)
       @instance = instance
       @attribute = attribute
       </diff>
      <filename>lib/upload_column/uploaded_file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -429,4 +429,21 @@ describe UploadColumn do
   #  end
   #end
   
+  describe &quot;uploading a file with an extension that is not in the whitelist&quot; do
+    
+    migrate
+    
+    before(:each) do
+      Event.upload_column(:image, :fix_file_extensions =&gt; false)
+      Event.validates_integrity_of :image
+      
+      @event = Event.new
+    end
+    
+    it &quot;should add an error to the record&quot; do
+      @event.image = stub_tempfile('kerb.jpg', nil, 'monkey.exe')
+      @event.errors.on(:image).should == &quot;.exe is not in the list of allowed extensions.&quot;
+    end
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/integration_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,10 @@
 require File.join(File.dirname(__FILE__), 'spec_helper')
-require File.join(File.dirname(__FILE__), '../lib/upload_column/sanitized_file')
-require File.join(File.dirname(__FILE__), '../lib/upload_column/uploaded_file')
-require File.join(File.dirname(__FILE__), '../lib/upload_column/upload_column')
 
 gem 'activerecord'
 require 'active_record'
 
+require File.join(File.dirname(__FILE__), '../lib/upload_column')
+
 ActiveRecord::Base.send(:include, UploadColumn)
 
 def disconnected_model(model_class)
@@ -324,5 +323,20 @@ describe &quot;an upload column with no file&quot; do
   end
 end
 
-
-
+describe &quot;UploadColumn.image_column&quot; do
+  before(:each) do
+    @class = Class.new(ActiveRecord::Base)
+    @class.send(:include, UploadColumn)
+  end
+  
+  it &quot;should call an upload column with some specialized options&quot; do
+    @class.should_receive(:upload_column).with(:sicada,
+      :manipulator =&gt; UploadColumn::Manipulators::RMagick,
+      :root_dir =&gt; File.join(RAILS_ROOT, 'public', 'images'),
+      :web_root =&gt; '/images',
+      :monkey =&gt; 'blah',
+      :extensions =&gt; UploadColumn::IMAGE_EXTENSIONS
+    )
+    @class.image_column(:sicada, :monkey =&gt; 'blah')
+  end
+end
\ No newline at end of file</diff>
      <filename>spec/upload_column_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require File.join(File.dirname(__FILE__), 'spec_helper')
+require File.join(File.dirname(__FILE__), '../lib/upload_column/upload_column')
 require File.join(File.dirname(__FILE__), '../lib/upload_column/sanitized_file')
 require File.join(File.dirname(__FILE__), '../lib/upload_column/uploaded_file')
 begin
@@ -6,475 +7,7 @@ begin
 rescue LoadError
 end
 
-describe &quot;SanitizedFile&quot;, :shared =&gt; true do
-  
-  describe &quot;a new SanitizedFile&quot; do
-    it &quot;should be empty on empty String, nil, empty StringIO&quot; do
-      UploadColumn::SanitizedFile.new(&quot;&quot;).should be_empty
-      UploadColumn::SanitizedFile.new(StringIO.new(&quot;&quot;)).should be_empty
-      UploadColumn::SanitizedFile.new(nil).should be_empty
-      file = mock('emptyfile')
-      file.should_receive(:size).at_least(:once).and_return(0)
-      UploadColumn::SanitizedFile.new(file).should be_empty
-    end
-  
-    it &quot;should not be empty on valid upload&quot; do
-      UploadColumn::SanitizedFile.new(stub_stringio('kerb.jpg', 'image/jpeg')).should_not be_empty
-      UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg')).should_not be_empty
-    end
-
-    it &quot;should sanitize invalid filenames&quot; do
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, &quot;test.jpg&quot;))
-      t.filename.should == &quot;test.jpg&quot;
-    
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, &quot;test-s,%&amp;m#st?.jpg&quot;))
-      t.filename.should == &quot;test-s___m_st_.jpg&quot;
-    
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, &quot;../../very_tricky/foo.bar&quot;))
-      t.filename.should_not =~ /[\\\/]/
-  
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, '`*foo'))
-      t.filename.should == &quot;__foo&quot;
-  
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, 'c:\temp\foo.txt'))
-      t.filename.should == &quot;foo.txt&quot;
-    
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, &quot;.&quot;))
-      t.filename.should == &quot;_.&quot;
-    end
-    
-    it &quot;should downcase uppercase filenames&quot; do
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', nil, &quot;DSC4056.JPG&quot;))
-      t.filename.should == &quot;dsc4056.jpg&quot;
-    end
-  
-  end
-  
-  # Note that SanitizedFile#path and #exists? need to be checked seperately as the return values will vary
-  describe &quot;all sanitized files&quot;, :shared =&gt; true do
-    
-    it &quot;should not be empty&quot; do
-      @file.should_not be_empty
-    end
-
-    it &quot;should return the original filename&quot; do
-      @file.original_filename.should == &quot;kerb.jpg&quot;
-    end
-
-    it &quot;should return the filename&quot; do
-      @file.filename.should == &quot;kerb.jpg&quot;
-    end
-
-    it &quot;should return the basename&quot; do
-      @file.basename.should == &quot;kerb&quot;
-    end
-
-    it &quot;should return the extension&quot; do
-      @file.extension.should == &quot;jpg&quot;
-    end
-
-    it &quot;should be moved to the correct location&quot; do
-      @file.move_to(public_path('gurr.jpg'))
-      File.exists?( public_path('gurr.jpg') ).should === true
-      file_path('kerb.jpg').should be_identical_with(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should have changed its path when moved&quot; do
-      @file.move_to(public_path('gurr.jpg'))
-      @file.path.should match_path(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should have changed its filename when moved&quot; do
-      @file.filename # Make sure the filename has been cached
-      @file.move_to(public_path('gurr.jpg'))
-      @file.filename.should == 'gurr.jpg'
-    end
-    
-    it &quot;should have split the filename when moved&quot; do
-      @file.move_to(public_path('gurr.monk'))
-      @file.basename.should == 'gurr'
-      @file.extension.should == 'monk'
-    end
-    
-    it &quot;should be copied to the correct location&quot; do
-      @file.copy_to(public_path('gurr.jpg'))
-      File.exists?( public_path('gurr.jpg') ).should === true
-      file_path('kerb.jpg').should be_identical_with(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should not have changed its path when copied&quot; do
-      lambda do
-        @file.copy_to(public_path('gurr.jpg'))
-      end.should_not change(@file, :path)
-    end
-    
-    it &quot;should not have changed its filename when copied&quot; do
-      lambda do
-        @file.copy_to(public_path('gurr.jpg'))
-      end.should_not change(@file, :filename)
-    end
-    
-    it &quot;should return an object of the same class when copied&quot; do
-      @file = @file.copy_to(public_path('gurr.jpg'))
-      @file.should be_an_instance_of(@file.class)
-    end
-    
-    it &quot;should adjust the path of the object that is returned when copied&quot; do
-      @file = @file.copy_to(public_path('gurr.jpg'))
-      @file.path.should match_path(public_path('gurr.jpg'))
-    end
-
-    it &quot;should adjust the filename of the object that is returned when copied&quot; do
-      @file.filename # Make sure the filename has been cached
-      @file = @file.copy_to(public_path('gurr.monk'))
-      @file.filename.should == 'gurr.monk'
-    end
-
-    it &quot;should split the filename of the object that is returned when copied&quot; do
-      @file = @file.copy_to(public_path('gurr.monk'))
-      @file.basename.should == 'gurr'
-      @file.extension.should == 'monk'
-    end
-    
-    after do
-      FileUtils.rm_rf(PUBLIC)
-    end
-  end
-  
-  describe &quot;a sanitized Tempfile&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', 'image/jpeg'))
-    end
-  
-    it_should_behave_like &quot;all sanitized files&quot;
-    
-    it &quot;should exist&quot; do
-      @file.should be_in_existence
-    end
-  
-    it &quot;should return the correct path&quot; do
-      @file.path.should_not == nil
-      @file.path.should =~ %r{^/tmp/kerb.jpg}
-    end
-  end
-
-  describe &quot;a sanitized StringIO&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_stringio('kerb.jpg', 'image/jpeg'))
-    end
-    
-    it_should_behave_like &quot;all sanitized files&quot;
-    
-    it &quot;should not exist&quot; do
-      @file.should_not be_in_existence
-    end
-  
-    it &quot;should return no path&quot; do
-      @file.path.should == nil
-    end
-    
-  end
-
-  describe &quot;a sanitized File object&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg'))
-      @file.should_not be_empty
-    end
-    
-    it_should_behave_like &quot;all sanitized files&quot;
-    
-    it &quot;should exits&quot; do
-      @file.should be_in_existence
-    end
-  
-    it &quot;should return correct path&quot; do
-      @file.path.should match_path(file_path('kerb.jpg'))
-    end
-  end
-
-  describe &quot;a SanitizedFile opened from a path&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(file_path('kerb.jpg'))
-      @file.should_not be_empty
-    end
-    
-    it_should_behave_like &quot;all sanitized files&quot;
-    
-    it &quot;should exits&quot; do
-      @file.should be_in_existence
-    end
-  
-    it &quot;should return correct path&quot; do
-      @file.path.should == file_path('kerb.jpg')
-    end
-  end
-
-  describe &quot;an empty SanitizedFile&quot; do
-    before do
-      @empty = UploadColumn::SanitizedFile.new(nil)
-    end
-  
-    it &quot;should be empty&quot; do
-      @empty.should be_empty
-    end
-    
-    it &quot;should not exist&quot; do
-      @empty.should_not be_in_existence
-    end
-  
-    it &quot;should have no size&quot; do
-      @empty.size.should == nil
-    end
-  
-    it &quot;should have no path&quot; do
-      @empty.path.should == nil
-    end
-  
-    it &quot;should have no original filename&quot; do
-      @empty.original_filename.should == nil
-    end
-  
-    it &quot;should have no filename&quot; do
-      @empty.filename.should == nil
-    end
-  
-    it &quot;should have no basename&quot; do
-      @empty.basename.should == nil
-    end
-  
-    it &quot;should have no extension&quot; do
-      @empty.extension.should == nil
-    end
-  end
-
-  describe &quot;a SanitizedFile&quot; do
-  
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', 'image/jpeg'))
-    end
-  
-    it &quot;should properly split into basename and extension&quot; do
-      @file.basename.should == &quot;kerb&quot;
-      @file.extension.should == &quot;jpg&quot;
-    end
-    
-    it &quot;should do a system call&quot; do
-      @file.send(:system_call, 'echo &quot;monkey&quot;').chomp.should == &quot;monkey&quot;
-    end
-  
-  end
-
-  describe &quot;a SanizedFile with a complex filename&quot; do
-    it &quot;properly split into basename and extension&quot; do
-      t = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', nil, 'complex.filename.tar.gz'))
-      t.basename.should == &quot;complex.filename&quot;
-      t.extension.should == &quot;tar.gz&quot;
-    end
-  end
-  
-  # FIXME: figure out why this doesn't run
-  #describe &quot;determinating the mime-type with a *nix exec&quot; do
-  #
-  #  before do
-  #    @file = stub_file('kerb.jpg', nil, 'harg.css')
-  #    @sanitized = UploadColumn::SanitizedFile.new(@file)
-  #  end
-  #  
-  #  it &quot;should chomp and return if it has no encoding&quot; do
-  #    @sanitized.should_receive(:system_call).with(%(file -bi &quot;#{@file.path}&quot;)).and_return(&quot;image/jpeg\n&quot;)
-  #    
-  #    @sanitized.send(:get_content_type_from_exec) #.should == &quot;image/jpeg&quot;
-  #  end
-  #  
-  #  it &quot;should chomp and return and chop off the encoding if it has one&quot; do
-  #    @sanitized.should_receive(:system_call).with(%(file -bi &quot;#{@file.path}&quot;)).and_return(&quot;text/plain; charset=utf-8;\n&quot;)
-  #    
-  #    @sanitized.send(:get_content_type_from_exec) #.should == &quot;text/plain&quot;
-  #  end
-  #  
-  #  it &quot;should not crap out when something weird happens&quot; do
-  #    @sanitized.should_receive(:system_call).with(%(file -bi &quot;#{@file.path}&quot;)).and_return(&quot;^blah//(?)wtf???&quot;)
-  #    
-  #    @sanitized.send(:get_content_type_from_exec).should == nil
-  #  end
-  #  
-  #end
-
-  describe &quot;The mime-type of a Sanitized File&quot; do
-  
-    before do
-      @file = stub_file('kerb.jpg', nil, 'harg.css')
-      @sanitized = UploadColumn::SanitizedFile.new(@file)
-    end
-
-    # TODO: refactor this test so it mocks out system_call
-    it &quot;should be determined via *nix exec&quot; do
-      @file.should_not_receive(:content_type)
-      @sanitized.should_not_receive(:extension)
-      @sanitized.should_receive(:get_content_type_from_exec).and_return('image/jpeg')
-      @sanitized.content_type.should == &quot;image/jpeg&quot;
-    end
-    
-    it &quot;shouldn't choke up when the *nix exec errors out&quot; do
-      lambda {
-        @sanitized.should_receive(:system_call).and_raise('monkey')
-        @sanitized.content_type
-      }.should_not raise_error(Exception)
-    end
-  
-    it &quot;should otherwise be loaded from MIME::Types&quot; do
-      if defined?(MIME::Types)
-        @sanitized.should_receive(:get_content_type_from_exec).and_return(nil) # Make sure the *nix exec isn't interfering
-        @sanitized.content_type.should == &quot;text/css&quot;
-      else
-        puts &quot;WARNING: Could not run all tests because MIME::Types is not defined, try installing the mime-types gem!&quot;
-      end
-    end
-  
-    it &quot;should be taken from the browser if all else fails&quot; do
-      @file.should_receive(:content_type).at_least(:once).and_return('application/xhtml+xml') # Set up browser behavior
-      @sanitized.should_receive(:get_content_type_from_mime_types).and_return(nil) # Make sure MIME::Types isn't interfering
-      @sanitized.should_receive(:get_content_type_from_exec).and_return(nil) # Make sure the *nix exec isn't interfering
-      @sanitized.content_type.should == &quot;application/xhtml+xml&quot;
-    end
-  end
-
-  describe &quot;a SanitizedFile with a wrong extension&quot; do
-
-    # This test currently always fails if MIME::Types is unavailable,
-    # TODO: come up with a clever way to stub out the content_type-y behaviour.
-    it &quot;should fix extention if fix_file_extensions is true&quot; do
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg', 'kerb.css'), :fix_file_extensions =&gt; true)
-            
-      t.content_type.should == &quot;image/jpeg&quot;
-      t.extension.should ==  &quot;jpeg&quot;
-      t.filename.should == &quot;kerb.jpeg&quot;
-    end
-  
-    it &quot;should not fix extention if fix_file_extensions is false&quot; do
-      t = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg', 'kerb.css'), :fix_file_extensions =&gt; false)
-      
-      t.content_type.should == &quot;image/jpeg&quot;
-      t.extension.should == &quot;css&quot;
-      t.filename.should == &quot;kerb.css&quot;
-    end
-  end
-  
-  describe &quot;a sanitized Tempfile&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', 'image/jpeg'))
-    end
-  
-    it_should_behave_like &quot;all sanitized files&quot;
-    
-    it &quot;should exist&quot; do
-      @file.should be_in_existence
-    end
-  
-    it &quot;should return the correct path&quot; do
-      @file.path.should_not == nil
-      @file.path.should =~ %r{^/tmp/kerb.jpg}
-    end
-  end
-  
-  describe &quot;copying a sanitized Tempfile with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file = @file.copy_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-
-  describe &quot;copying a sanitized StringIO with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_stringio('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file = @file.copy_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-  describe &quot;copying a sanitized File object with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file = @file.copy_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-  describe &quot;copying a sanitized StringIO with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(file_path('kerb.jpg'), :permissions =&gt; 0755)
-      @file = @file.copy_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-  
-  describe &quot;moving a sanitized Tempfile with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_tempfile('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file.move_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-
-  describe &quot;moving a sanitized StringIO with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_stringio('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file.move_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-  describe &quot;moving a sanitized File object with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(stub_file('kerb.jpg', 'image/jpeg'), :permissions =&gt; 0755)
-      @file.move_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-  describe &quot;moving a sanitized StringIO with permissions set&quot; do
-    before do
-      @file = UploadColumn::SanitizedFile.new(file_path('kerb.jpg'), :permissions =&gt; 0755)
-      @file.move_to(public_path('gurr.jpg'))
-    end
-    
-    it &quot;should set the right permissions&quot; do
-      @file.should have_permissions(0755)
-    end
-  end
-  
-end
-
-
-
-
-############### UploadedFile ###############
-
 describe &quot;UploadedFile&quot; do
-  it_should_behave_like &quot;SanitizedFile&quot;
   
   describe &quot;all uploaded files&quot;, :shared =&gt; true do
     it &quot;should not be empty&quot; do</diff>
      <filename>spec/uploaded_file_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a921adda059f9ae69a9652c0c3eb701928f3b78</id>
    </parent>
  </parents>
  <author>
    <name>Jonas Nicklas</name>
    <email>jonas.nicklas@gmail.com</email>
  </author>
  <url>http://github.com/jnicklas/uploadcolumn/commit/0a20e7c7c9f6ff8f2a736c92e1a3d0047fe02adb</url>
  <id>0a20e7c7c9f6ff8f2a736c92e1a3d0047fe02adb</id>
  <committed-date>2007-08-25T03:53:02-07:00</committed-date>
  <authored-date>2007-08-25T03:53:02-07:00</authored-date>
  <message>split up specs and preparations for integrity testing

git-svn-id: http://uploadcolumn.rubyforge.org/svn/trunk@92 02338ee4-8dee-4235-8d26-5b68cf25713b</message>
  <tree>67f96d8c131a41adea0a7a72d57f342e7f98819c</tree>
  <committer>
    <name>Jonas Nicklas</name>
    <email>jonas.nicklas@gmail.com</email>
  </committer>
</commit>
