<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Testing File Uploads with Webrat and Paperclip</title>
	<atom:link href="http://blog.thefrontiergroup.com.au/2009/06/testing-file-uploads-with-webrat-and-paperclip/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thefrontiergroup.com.au/2009/06/testing-file-uploads-with-webrat-and-paperclip/</link>
	<description>Your peek inside the collective mind of The Frontier Group</description>
	<lastBuildDate>Wed, 01 Feb 2012 04:42:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Luis</title>
		<link>http://blog.thefrontiergroup.com.au/2009/06/testing-file-uploads-with-webrat-and-paperclip/comment-page-1/#comment-2149</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Tue, 07 Dec 2010 15:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://thefrontiergroup.com.au/blog/?p=389#comment-2149</guid>
		<description>this error appears ArgumentError Exception: wrong number of arguments (3 for 2) it seems that I can not put the content_type to the attach_file method</description>
		<content:encoded><![CDATA[<p>this error appears ArgumentError Exception: wrong number of arguments (3 for 2) it seems that I can not put the content_type to the attach_file method</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Morrison</title>
		<link>http://blog.thefrontiergroup.com.au/2009/06/testing-file-uploads-with-webrat-and-paperclip/comment-page-1/#comment-437</link>
		<dc:creator>Jason Morrison</dc:creator>
		<pubDate>Thu, 08 Oct 2009 17:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://thefrontiergroup.com.au/blog/?p=389#comment-437</guid>
		<description>There was a slight typo in my last comment.  The last argument to attach_file should be content_type, not type.</description>
		<content:encoded><![CDATA[<p>There was a slight typo in my last comment.  The last argument to attach_file should be content_type, not type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Morrison</title>
		<link>http://blog.thefrontiergroup.com.au/2009/06/testing-file-uploads-with-webrat-and-paperclip/comment-page-1/#comment-436</link>
		<dc:creator>Jason Morrison</dc:creator>
		<pubDate>Thu, 08 Oct 2009 17:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://thefrontiergroup.com.au/blog/?p=389#comment-436</guid>
		<description>If you&#039;re using Paperclip, it mixes Paperclip::Upfile into File, which provides a quick-and-dirty #content_type method, so you can do something like this:

    When /^I attach &quot;([^\&quot;]*)&quot; image to the &quot;([^\&quot;]*)&quot; file field$/ do &#124;filename, field&#124;
      full_file_path = File.join(RAILS_ROOT, test_asset_path, filename)
      content_type = File.new(full_file_path).content_type
      attach_file field, full_file_path, type
    end</description>
		<content:encoded><![CDATA[<p>If you&#8217;re using Paperclip, it mixes Paperclip::Upfile into File, which provides a quick-and-dirty #content_type method, so you can do something like this:</p>
<p>    When /^I attach &#8220;([^\"]*)&#8221; image to the &#8220;([^\"]*)&#8221; file field$/ do |filename, field|<br />
      full_file_path = File.join(RAILS_ROOT, test_asset_path, filename)<br />
      content_type = File.new(full_file_path).content_type<br />
      attach_file field, full_file_path, type<br />
    end</p>
]]></content:encoded>
	</item>
</channel>
</rss>

