<?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: Timecop 0.2.0 Released: Freeze and Rebase Time in Ruby</title>
	<atom:link href="http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/</link>
	<description>News and updates from the people at SmartLogic Solutions</description>
	<lastBuildDate>Fri, 12 Mar 2010 02:06:34 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: John Trupiano</title>
		<link>http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/comment-page-1/#comment-721</link>
		<dc:creator>John Trupiano</dc:creator>
		<pubDate>Fri, 26 Dec 2008 17:12:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=445#comment-721</guid>
		<description>Hey Scott,

Thanks for the feedback.  I&#039;d doubt that your specific distro would have any effect whatsoever on whether or not the #travel function works as intended.  I&#039;m not doing anything fancy with the system clock (basically just mocking Time.now).  As a result, I&#039;d expect everyone to experience the same problems you&#039;re having.  I&#039;d really like to sort this out if an issue does indeed exist.

You mentioned that some of your specs started failing....not all of them?  Is there any common thread you can see across those that began to fail?

If you&#039;re willing (and have the time), is there a chance you could write a very simple failing test case?  The most important thing would be to isolate the issue outside of the context of your application&#039;s logic.  Something as simple as...

&lt;pre lang=&quot;ruby&quot;&gt;
def test_doesnt_work_for_me
  past = Time.local(2008, 10, 1)
  Timecop.travel(past) do
    # assert that the difference between now and the value passed to #travel is less than a second
    # this is basically assuming that your system is fast enough to execute this call in under a second
    # adjust as you feel the need.
    assert (Time.now - past).abs &lt;= 1000
  end
end
&lt;/pre&gt;

This is actually very close to the types of tests I wrote for this gem to ensure that #travel worked properly.

If you&#039;re willing to pitch in a hand, we can continue this conversation via email or on github.

Thanks for your help, and especially for the feedback!

-John</description>
		<content:encoded><![CDATA[<p>Hey Scott,</p>
<p>Thanks for the feedback.  I&#8217;d doubt that your specific distro would have any effect whatsoever on whether or not the #travel function works as intended.  I&#8217;m not doing anything fancy with the system clock (basically just mocking Time.now).  As a result, I&#8217;d expect everyone to experience the same problems you&#8217;re having.  I&#8217;d really like to sort this out if an issue does indeed exist.</p>
<p>You mentioned that some of your specs started failing&#8230;.not all of them?  Is there any common thread you can see across those that began to fail?</p>
<p>If you&#8217;re willing (and have the time), is there a chance you could write a very simple failing test case?  The most important thing would be to isolate the issue outside of the context of your application&#8217;s logic.  Something as simple as&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> test_doesnt_work_for_me
  past = <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">local</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2008</span>, <span style="color:#006666;">10</span>, <span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  Timecop.<span style="color:#9900CC;">travel</span><span style="color:#006600; font-weight:bold;">&#40;</span>past<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#008000; font-style:italic;"># assert that the difference between now and the value passed to #travel is less than a second</span>
    <span style="color:#008000; font-style:italic;"># this is basically assuming that your system is fast enough to execute this call in under a second</span>
    <span style="color:#008000; font-style:italic;"># adjust as you feel the need.</span>
    assert <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span> <span style="color:#006600; font-weight:bold;">-</span> past<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">abs</span> <span style="color:#006600; font-weight:bold;">&lt;</span>= <span style="color:#006666;">1000</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This is actually very close to the types of tests I wrote for this gem to ensure that #travel worked properly.</p>
<p>If you&#8217;re willing to pitch in a hand, we can continue this conversation via email or on github.</p>
<p>Thanks for your help, and especially for the feedback!</p>
<p>-John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Moe</title>
		<link>http://blog.smartlogicsolutions.com/2008/12/24/timecop-2-released-freeze-and-rebase-time-ruby/comment-page-1/#comment-720</link>
		<dc:creator>Scott Moe</dc:creator>
		<pubDate>Fri, 26 Dec 2008 15:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=445#comment-720</guid>
		<description>Updated this morning and some specs started failing. I changed travel to freeze in all my specs that use timecop and they passed again. 

That might be as intended but based on the information from this post I am thinking travel might not be working right, at least in my Debian Linux development environment.

Either way it was a quick fix and considering all time I have saved using timecop for testing I am thrilled to have a great testing facility like this.

Thanks for the good work.</description>
		<content:encoded><![CDATA[<p>Updated this morning and some specs started failing. I changed travel to freeze in all my specs that use timecop and they passed again. </p>
<p>That might be as intended but based on the information from this post I am thinking travel might not be working right, at least in my Debian Linux development environment.</p>
<p>Either way it was a quick fix and considering all time I have saved using timecop for testing I am thrilled to have a great testing facility like this.</p>
<p>Thanks for the good work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
