On Jul 3, 2008, at 8:27 AM, Matt Darby wrote:

On Jul 1, 11:21 am, Matt Darby <[EMAIL PROTECTED]> wrote:
On Jul 1, 2008, at 8:23 AM, Tom Stuart wrote:

$ ./script/console
Date.today.minus_with_duration(5.days)
=> Thu, 26 Jun 2008
Date.today.minus_without_duration(5.days.to_i)
=> Sun, 17 Sep 0825

Is this a load-order problem? Perhaps
ActiveSupport::CoreExtensions::Date::Calculations isn't kicking in
correctly.
Anyone else have thoughts on this?

Yeah - use the debugger (ruby-debug) and the failing test case:

it "should have 5.days as the proper fixnum" do
  require 'rubygems'; require 'ruby-debug'; debugger
  5.days.to_i.should == 5.days
end

Scott
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to