repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Change soft-fail to use the config, rather than env
[rbx.git]
/
spec
/
frozen
/
1.8
/
library
/
date
/
upto_spec.rb
blob
41c1733e8782d32feeaa0fd2a856fe95ff983690
1
require 'date'
2
require File.dirname(__FILE__) + '/../../spec_helper'
3
4
describe "Date#upto" do
5
6
it "should be able to step forward in time" do
7
ds = Date.civil(2008, 10, 11)
8
de = Date.civil(2008, 9, 29)
9
count = 0
10
de.upto(ds) do |d|
11
d.should <= ds
12
d.should >= de
13
count += 1
14
end
15
count.should == 13
16
end
17
18
end