Change soft-fail to use the config, rather than env
[rbx.git] / spec / frozen / 1.8 / library / date / constants_spec.rb
blob80911e5c262c0541b16610736205de3e6636894d
1 require 'date' 
2 require File.dirname(__FILE__) + '/../../spec_helper'
4 describe "Date constants" do
6   it "should define ITALY" do
7     Date::ITALY.should == 2299161 # 1582-10-15
8   end
10   it "should define ENGLAND" do
11     Date::ENGLAND.should == 2361222 # 1752-09-14
12   end
13   
14   # Fixes in 1.8.7
15   ruby_bug "#", "1.8.6" do
16     it "should define JULIAN" do
17       (Date::JULIAN <=> Date::Infinity.new).should == 0
18     end
19   end
21   # Fixed in 1.8.7
22   ruby_bug "#", "1.8.6" do
23     it "should define GREGORIAN" do
24       (Date::GREGORIAN <=> -Date::Infinity.new).should == 0
25     end
26   end
28   it "should define MONTHNAMES" do
29     Date::MONTHNAMES.should == [nil] + %w(January February March April May June July
30                                           August September October November December)
31   end
32   
33   it "should define DAYNAMES" do
34     Date::DAYNAMES.should == %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
35   end
36   
37   it "should define ABBR_MONTHNAMES" do
38     Date::ABBR_DAYNAMES.should == %w(Sun Mon Tue Wed Thu Fri Sat)
39   end
41 end