<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Unit Testing the file_column ruby on rails plugin</title>
	<link>http://jchristopherhawley.com/2006/07/22/unit-testing-the-file_column-ruby-on-rails-plugin/</link>
	<description></description>
	<pubDate>Tue, 07 Feb 2012 07:24:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Hehmer</title>
		<link>http://jchristopherhawley.com/2006/07/22/unit-testing-the-file_column-ruby-on-rails-plugin/#comment-1809</link>
		<pubDate>Wed, 10 Aug 2011 15:47:43 +0000</pubDate>
		<guid>http://jchristopherhawley.com/2006/07/22/unit-testing-the-file_column-ruby-on-rails-plugin/#comment-1809</guid>
					<description>&lt;strong&gt;Great One...&lt;/strong&gt;

I must say, its worth it! My link,   http://debbie.20six.de/,thanks haha...</description>
		<content:encoded><![CDATA[<p><strong>Great One&#8230;</strong></p>
<p>I must say, its worth it! My link,   <a href='http://debbie.20six.de/,thanks' rel='nofollow'>http://debbie.20six.de/,thanks</a> haha&#8230;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: JC</title>
		<link>http://jchristopherhawley.com/2006/07/22/unit-testing-the-file_column-ruby-on-rails-plugin/#comment-2</link>
		<pubDate>Sat, 22 Jul 2006 15:58:03 +0000</pubDate>
		<guid>http://jchristopherhawley.com/2006/07/22/unit-testing-the-file_column-ruby-on-rails-plugin/#comment-2</guid>
					<description>Yeah so another note - I still had 4 unit tests failing for file column.  In the abstract_unit.rb class the RAILS_ENV was set to:
   RAILS_ENV=&quot;&quot;
and I changed it to:
   RAILS_ENV=&quot;test&quot;
thinking, hey that'd be a great idea. Not so good.  In test_case.rb the default path for images is changed if in the test environment:
  # If we are running in the &quot;test&quot; environment, we overwrite the default 
  # settings for FileColumn so that files are not uploaded into &quot;/public/&quot;
  # in tests but rather into the directory &quot;/test/tmp/file_column&quot;.
  if RAILS_ENV == &quot;test&quot;
    FileColumn::ClassMethods::DEFAULT_OPTIONS[:root_path] =
      File.join(RAILS_ROOT, &quot;test&quot;, &quot;tmp&quot;, &quot;file_column&quot;)
  end
which will cause 4 tests to fail/error out.  The RAILS_ROOT is set in abstract_unit.rb to have the images saved in the same directory as abstract_unit, so the line in test_case.rb is redundant and unnecessary.</description>
		<content:encoded><![CDATA[<p>Yeah so another note - I still had 4 unit tests failing for file column.  In the abstract_unit.rb class the RAILS_ENV was set to:<br />
   RAILS_ENV=&#8221;"<br />
and I changed it to:<br />
   RAILS_ENV=&#8221;test&#8221;<br />
thinking, hey that&#8217;d be a great idea. Not so good.  In test_case.rb the default path for images is changed if in the test environment:<br />
  # If we are running in the &#8220;test&#8221; environment, we overwrite the default<br />
  # settings for FileColumn so that files are not uploaded into &#8220;/public/&#8221;<br />
  # in tests but rather into the directory &#8220;/test/tmp/file_column&#8221;.<br />
  if RAILS_ENV == &#8220;test&#8221;<br />
    FileColumn::ClassMethods::DEFAULT_OPTIONS[:root_path] =<br />
      File.join(RAILS_ROOT, &#8220;test&#8221;, &#8220;tmp&#8221;, &#8220;file_column&#8221;)<br />
  end<br />
which will cause 4 tests to fail/error out.  The RAILS_ROOT is set in abstract_unit.rb to have the images saved in the same directory as abstract_unit, so the line in test_case.rb is redundant and unnecessary.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

