month.rb 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +74 -0
- data/Gemfile +2 -0
- data/LICENSE +21 -0
- data/README.md +145 -0
- data/TODO.txt +26 -0
- data/lib/Month/VERSION.rb +1 -1
- data/month.rb.gemspec +44 -0
- data/test/tc_Date_to_month.rb +21 -0
- data/test/tc_Month_begin_date.rb +21 -0
- data/test/tc_Month_beginning.rb +21 -0
- data/test/tc_Month_beginning_of_month.rb +21 -0
- data/test/tc_Month_beginning_of_the_month.rb +21 -0
- data/test/tc_Month_cdate.rb +34 -0
- data/test/tc_Month_cdates.rb +111 -0
- data/test/tc_Month_comparator.rb +17 -0
- data/test/tc_Month_date.rb +34 -0
- data/test/tc_Month_dates.rb +111 -0
- data/test/tc_Month_day.rb +226 -0
- data/test/tc_Month_day_long.rb +152 -0
- data/test/tc_Month_day_short.rb +152 -0
- data/test/tc_Month_day_shortest.rb +152 -0
- data/test/tc_Month_days.rb +21 -0
- data/test/tc_Month_days_in_month.rb +21 -0
- data/test/tc_Month_days_in_the_month.rb +21 -0
- data/test/tc_Month_each_day.rb +21 -0
- data/test/tc_Month_end.rb +21 -0
- data/test/tc_Month_end_date.rb +21 -0
- data/test/tc_Month_end_of_month.rb +21 -0
- data/test/tc_Month_end_of_the_month.rb +21 -0
- data/test/tc_Month_eqlQ.rb +13 -0
- data/test/tc_Month_finish.rb +21 -0
- data/test/tc_Month_finish_date.rb +21 -0
- data/test/tc_Month_finish_of_month.rb +21 -0
- data/test/tc_Month_finish_of_the_month.rb +21 -0
- data/test/tc_Month_initialize.rb +28 -0
- data/test/tc_Month_last.rb +11 -0
- data/test/tc_Month_last_month.rb +11 -0
- data/test/tc_Month_method_missing.rb +116 -0
- data/test/tc_Month_minus.rb +23 -0
- data/test/tc_Month_next.rb +12 -0
- data/test/tc_Month_next_month.rb +12 -0
- data/test/tc_Month_plus.rb +23 -0
- data/test/tc_Month_prev.rb +11 -0
- data/test/tc_Month_prev_month.rb +11 -0
- data/test/tc_Month_previous.rb +11 -0
- data/test/tc_Month_previous_month.rb +11 -0
- data/test/tc_Month_prior.rb +11 -0
- data/test/tc_Month_prior_month.rb +11 -0
- data/test/tc_Month_self.begin_date.rb +46 -0
- data/test/tc_Month_self.beginning.rb +46 -0
- data/test/tc_Month_self.beginning_of_month.rb +46 -0
- data/test/tc_Month_self.beginning_of_the_month.rb +46 -0
- data/test/tc_Month_self.cdate.rb +33 -0
- data/test/tc_Month_self.cdates.rb +325 -0
- data/test/tc_Month_self.date.rb +33 -0
- data/test/tc_Month_self.dates.rb +325 -0
- data/test/tc_Month_self.day.rb +226 -0
- data/test/tc_Month_self.day_long.rb +152 -0
- data/test/tc_Month_self.day_short.rb +152 -0
- data/test/tc_Month_self.day_shortest.rb +152 -0
- data/test/tc_Month_self.days.rb +124 -0
- data/test/tc_Month_self.days_in_month.rb +124 -0
- data/test/tc_Month_self.days_in_the_month.rb +124 -0
- data/test/tc_Month_self.end.rb +21 -0
- data/test/tc_Month_self.end_date.rb +21 -0
- data/test/tc_Month_self.end_of_month.rb +21 -0
- data/test/tc_Month_self.end_of_the_month.rb +21 -0
- data/test/tc_Month_self.finish.rb +21 -0
- data/test/tc_Month_self.finish_date.rb +21 -0
- data/test/tc_Month_self.finish_of_month.rb +21 -0
- data/test/tc_Month_self.finish_of_the_month.rb +21 -0
- data/test/tc_Month_self.from_date.rb +21 -0
- data/test/tc_Month_self.last.rb +47 -0
- data/test/tc_Month_self.last_month.rb +47 -0
- data/test/tc_Month_self.method_missing.rb +227 -0
- data/test/tc_Month_self.next.rb +23 -0
- data/test/tc_Month_self.next_month.rb +23 -0
- data/test/tc_Month_self.now.rb +9 -0
- data/test/tc_Month_self.of.rb +78 -0
- data/test/tc_Month_self.prev.rb +23 -0
- data/test/tc_Month_self.prev_month.rb +23 -0
- data/test/tc_Month_self.previous.rb +23 -0
- data/test/tc_Month_self.previous_month.rb +23 -0
- data/test/tc_Month_self.prior.rb +23 -0
- data/test/tc_Month_self.prior_month.rb +23 -0
- data/test/tc_Month_self.start.rb +21 -0
- data/test/tc_Month_self.start_date.rb +21 -0
- data/test/tc_Month_self.start_of_month.rb +21 -0
- data/test/tc_Month_self.start_of_the_month.rb +21 -0
- data/test/tc_Month_self.succ.rb +23 -0
- data/test/tc_Month_self.succ_month.rb +23 -0
- data/test/tc_Month_self.successor.rb +23 -0
- data/test/tc_Month_self.successor_month.rb +23 -0
- data/test/tc_Month_self.this.rb +23 -0
- data/test/tc_Month_self.to_i.rb +100 -0
- data/test/tc_Month_self.to_long.rb +100 -0
- data/test/tc_Month_self.to_num.rb +100 -0
- data/test/tc_Month_self.to_number.rb +100 -0
- data/test/tc_Month_self.to_short.rb +100 -0
- data/test/tc_Month_self.today.rb +9 -0
- data/test/tc_Month_self.wday.rb +292 -0
- data/test/tc_Month_start.rb +21 -0
- data/test/tc_Month_start_date.rb +21 -0
- data/test/tc_Month_start_of_month.rb +21 -0
- data/test/tc_Month_start_of_the_month.rb +21 -0
- data/test/tc_Month_succ.rb +11 -0
- data/test/tc_Month_succ_month.rb +11 -0
- data/test/tc_Month_successor.rb +11 -0
- data/test/tc_Month_successor_month.rb +11 -0
- data/test/tc_Month_to_date.rb +17 -0
- data/test/tc_Month_to_i.rb +20 -0
- data/test/tc_Month_to_long.rb +20 -0
- data/test/tc_Month_to_num.rb +20 -0
- data/test/tc_Month_to_number.rb +20 -0
- data/test/tc_Month_to_s.rb +40 -0
- data/test/tc_Month_to_short.rb +20 -0
- data/test/tc_gemspec.rb +42 -0
- data/test/ts_Month.rb +14 -0
- metadata +126 -5
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# test/tc_Month_self.day_long.rb
|
|
2
|
+
|
|
3
|
+
class TC_Month_self_day_long < Minitest::Test
|
|
4
|
+
|
|
5
|
+
def test_num_as_num
|
|
6
|
+
assert_equal 'Sunday', Month.day_long(1, 10, 2006)
|
|
7
|
+
assert_equal 'Monday', Month.day_long(2, 10, 2006)
|
|
8
|
+
assert_equal 'Tuesday', Month.day_long(3, 10, 2006)
|
|
9
|
+
assert_equal 'Wednesday', Month.day_long(4, 10, 2006)
|
|
10
|
+
assert_equal 'Thursday', Month.day_long(5, 10, 2006)
|
|
11
|
+
assert_equal 'Friday', Month.day_long(6, 10, 2006)
|
|
12
|
+
assert_equal 'Saturday', Month.day_long(7, 10, 2006)
|
|
13
|
+
assert_equal 'Sunday', Month.day_long(8, 10, 2006)
|
|
14
|
+
assert_equal 'Monday', Month.day_long(9, 10, 2006)
|
|
15
|
+
assert_equal 'Tuesday', Month.day_long(10, 10, 2006)
|
|
16
|
+
assert_equal 'Wednesday', Month.day_long(11, 10, 2006)
|
|
17
|
+
assert_equal 'Thursday', Month.day_long(12, 10, 2006)
|
|
18
|
+
assert_equal 'Friday', Month.day_long(13, 10, 2006)
|
|
19
|
+
assert_equal 'Saturday', Month.day_long(14, 10, 2006)
|
|
20
|
+
assert_equal 'Sunday', Month.day_long(15, 10, 2006)
|
|
21
|
+
assert_equal 'Monday', Month.day_long(16, 10, 2006)
|
|
22
|
+
assert_equal 'Tuesday', Month.day_long(17, 10, 2006)
|
|
23
|
+
assert_equal 'Wednesday', Month.day_long(18, 10, 2006)
|
|
24
|
+
assert_equal 'Thursday', Month.day_long(19, 10, 2006)
|
|
25
|
+
assert_equal 'Friday', Month.day_long(20, 10, 2006)
|
|
26
|
+
assert_equal 'Saturday', Month.day_long(21, 10, 2006)
|
|
27
|
+
assert_equal 'Sunday', Month.day_long(22, 10, 2006)
|
|
28
|
+
assert_equal 'Monday', Month.day_long(23, 10, 2006)
|
|
29
|
+
assert_equal 'Tuesday', Month.day_long(24, 10, 2006)
|
|
30
|
+
assert_equal 'Wednesday', Month.day_long(25, 10, 2006)
|
|
31
|
+
assert_equal 'Thursday', Month.day_long(26, 10, 2006)
|
|
32
|
+
assert_equal 'Friday', Month.day_long(27, 10, 2006)
|
|
33
|
+
assert_equal 'Saturday', Month.day_long(28, 10, 2006)
|
|
34
|
+
assert_equal 'Sunday', Month.day_long(29, 10, 2006)
|
|
35
|
+
assert_equal 'Monday', Month.day_long(30, 10, 2006)
|
|
36
|
+
assert_equal 'Tuesday', Month.day_long(31, 10, 2006)
|
|
37
|
+
assert_equal 'Wednesday', Month.day_long(1, 11, 2006)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def test_num_as_string
|
|
41
|
+
assert_equal 'Sunday', Month.day_long('1', '10', '2006')
|
|
42
|
+
assert_equal 'Monday', Month.day_long('2', '10', '2006')
|
|
43
|
+
assert_equal 'Tuesday', Month.day_long('3', '10', '2006')
|
|
44
|
+
assert_equal 'Wednesday', Month.day_long('4', '10', '2006')
|
|
45
|
+
assert_equal 'Thursday', Month.day_long('5', '10', '2006')
|
|
46
|
+
assert_equal 'Friday', Month.day_long('6', '10', '2006')
|
|
47
|
+
assert_equal 'Saturday', Month.day_long('7', '10', '2006')
|
|
48
|
+
assert_equal 'Sunday', Month.day_long('8', '10', '2006')
|
|
49
|
+
assert_equal 'Monday', Month.day_long('9', '10', '2006')
|
|
50
|
+
assert_equal 'Tuesday', Month.day_long('10', '10', '2006')
|
|
51
|
+
assert_equal 'Wednesday', Month.day_long('11', '10', '2006')
|
|
52
|
+
assert_equal 'Thursday', Month.day_long('12', '10', '2006')
|
|
53
|
+
assert_equal 'Friday', Month.day_long('13', '10', '2006')
|
|
54
|
+
assert_equal 'Saturday', Month.day_long('14', '10', '2006')
|
|
55
|
+
assert_equal 'Sunday', Month.day_long('15', '10', '2006')
|
|
56
|
+
assert_equal 'Monday', Month.day_long('16', '10', '2006')
|
|
57
|
+
assert_equal 'Tuesday', Month.day_long('17', '10', '2006')
|
|
58
|
+
assert_equal 'Wednesday', Month.day_long('18', '10', '2006')
|
|
59
|
+
assert_equal 'Thursday', Month.day_long('19', '10', '2006')
|
|
60
|
+
assert_equal 'Friday', Month.day_long('20', '10', '2006')
|
|
61
|
+
assert_equal 'Saturday', Month.day_long('21', '10', '2006')
|
|
62
|
+
assert_equal 'Sunday', Month.day_long('22', '10', '2006')
|
|
63
|
+
assert_equal 'Monday', Month.day_long('23', '10', '2006')
|
|
64
|
+
assert_equal 'Tuesday', Month.day_long('24', '10', '2006')
|
|
65
|
+
assert_equal 'Wednesday', Month.day_long('25', '10', '2006')
|
|
66
|
+
assert_equal 'Thursday', Month.day_long('26', '10', '2006')
|
|
67
|
+
assert_equal 'Friday', Month.day_long('27', '10', '2006')
|
|
68
|
+
assert_equal 'Saturday', Month.day_long('28', '10', '2006')
|
|
69
|
+
assert_equal 'Sunday', Month.day_long('29', '10', '2006')
|
|
70
|
+
assert_equal 'Monday', Month.day_long('30', '10', '2006')
|
|
71
|
+
assert_equal 'Tuesday', Month.day_long('31', '10', '2006')
|
|
72
|
+
assert_equal 'Wednesday', Month.day_long('1', '11', '2006')
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_num_as_num_with_defaults
|
|
76
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
77
|
+
assert_equal 'Sunday', Month.day_long(1)
|
|
78
|
+
assert_equal 'Monday', Month.day_long(2)
|
|
79
|
+
assert_equal 'Tuesday', Month.day_long(3)
|
|
80
|
+
assert_equal 'Wednesday', Month.day_long(4)
|
|
81
|
+
assert_equal 'Thursday', Month.day_long(5)
|
|
82
|
+
assert_equal 'Friday', Month.day_long(6)
|
|
83
|
+
assert_equal 'Saturday', Month.day_long(7)
|
|
84
|
+
assert_equal 'Sunday', Month.day_long(8)
|
|
85
|
+
assert_equal 'Monday', Month.day_long(9)
|
|
86
|
+
assert_equal 'Tuesday', Month.day_long(10)
|
|
87
|
+
assert_equal 'Wednesday', Month.day_long(11)
|
|
88
|
+
assert_equal 'Thursday', Month.day_long(12)
|
|
89
|
+
assert_equal 'Friday', Month.day_long(13)
|
|
90
|
+
assert_equal 'Saturday', Month.day_long(14)
|
|
91
|
+
assert_equal 'Sunday', Month.day_long(15)
|
|
92
|
+
assert_equal 'Monday', Month.day_long(16)
|
|
93
|
+
assert_equal 'Tuesday', Month.day_long(17)
|
|
94
|
+
assert_equal 'Wednesday', Month.day_long(18)
|
|
95
|
+
assert_equal 'Thursday', Month.day_long(19)
|
|
96
|
+
assert_equal 'Friday', Month.day_long(20)
|
|
97
|
+
assert_equal 'Saturday', Month.day_long(21)
|
|
98
|
+
assert_equal 'Sunday', Month.day_long(22)
|
|
99
|
+
assert_equal 'Monday', Month.day_long(23)
|
|
100
|
+
assert_equal 'Tuesday', Month.day_long(24)
|
|
101
|
+
assert_equal 'Wednesday', Month.day_long(25)
|
|
102
|
+
assert_equal 'Thursday', Month.day_long(26)
|
|
103
|
+
assert_equal 'Friday', Month.day_long(27)
|
|
104
|
+
assert_equal 'Saturday', Month.day_long(28)
|
|
105
|
+
assert_equal 'Sunday', Month.day_long(29)
|
|
106
|
+
assert_equal 'Monday', Month.day_long(30)
|
|
107
|
+
assert_equal 'Tuesday', Month.day_long(31)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def test_num_as_string_with_defaults
|
|
112
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
113
|
+
assert_equal 'Sunday', Month.day_long('1')
|
|
114
|
+
assert_equal 'Monday', Month.day_long('2')
|
|
115
|
+
assert_equal 'Tuesday', Month.day_long('3')
|
|
116
|
+
assert_equal 'Wednesday', Month.day_long('4')
|
|
117
|
+
assert_equal 'Thursday', Month.day_long('5')
|
|
118
|
+
assert_equal 'Friday', Month.day_long('6')
|
|
119
|
+
assert_equal 'Saturday', Month.day_long('7')
|
|
120
|
+
assert_equal 'Sunday', Month.day_long('8')
|
|
121
|
+
assert_equal 'Monday', Month.day_long('9')
|
|
122
|
+
assert_equal 'Tuesday', Month.day_long('10')
|
|
123
|
+
assert_equal 'Wednesday', Month.day_long('11')
|
|
124
|
+
assert_equal 'Thursday', Month.day_long('12')
|
|
125
|
+
assert_equal 'Friday', Month.day_long('13')
|
|
126
|
+
assert_equal 'Saturday', Month.day_long('14')
|
|
127
|
+
assert_equal 'Sunday', Month.day_long('15')
|
|
128
|
+
assert_equal 'Monday', Month.day_long('16')
|
|
129
|
+
assert_equal 'Tuesday', Month.day_long('17')
|
|
130
|
+
assert_equal 'Wednesday', Month.day_long('18')
|
|
131
|
+
assert_equal 'Thursday', Month.day_long('19')
|
|
132
|
+
assert_equal 'Friday', Month.day_long('20')
|
|
133
|
+
assert_equal 'Saturday', Month.day_long('21')
|
|
134
|
+
assert_equal 'Sunday', Month.day_long('22')
|
|
135
|
+
assert_equal 'Monday', Month.day_long('23')
|
|
136
|
+
assert_equal 'Tuesday', Month.day_long('24')
|
|
137
|
+
assert_equal 'Wednesday', Month.day_long('25')
|
|
138
|
+
assert_equal 'Thursday', Month.day_long('26')
|
|
139
|
+
assert_equal 'Friday', Month.day_long('27')
|
|
140
|
+
assert_equal 'Saturday', Month.day_long('28')
|
|
141
|
+
assert_equal 'Sunday', Month.day_long('29')
|
|
142
|
+
assert_equal 'Monday', Month.day_long('30')
|
|
143
|
+
assert_equal 'Tuesday', Month.day_long('31')
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def test_crap
|
|
148
|
+
assert_nil Month.day_long('random')
|
|
149
|
+
assert_nil Month.day_long(32)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# test/tc_Month_self.day_short.rb
|
|
2
|
+
|
|
3
|
+
class TC_Month_self_day_short < Minitest::Test
|
|
4
|
+
|
|
5
|
+
def test_num_as_num
|
|
6
|
+
assert_equal 'Sun', Month.day_short(1, 10, 2006)
|
|
7
|
+
assert_equal 'Mon', Month.day_short(2, 10, 2006)
|
|
8
|
+
assert_equal 'Tue', Month.day_short(3, 10, 2006)
|
|
9
|
+
assert_equal 'Wed', Month.day_short(4, 10, 2006)
|
|
10
|
+
assert_equal 'Thu', Month.day_short(5, 10, 2006)
|
|
11
|
+
assert_equal 'Fri', Month.day_short(6, 10, 2006)
|
|
12
|
+
assert_equal 'Sat', Month.day_short(7, 10, 2006)
|
|
13
|
+
assert_equal 'Sun', Month.day_short(8, 10, 2006)
|
|
14
|
+
assert_equal 'Mon', Month.day_short(9, 10, 2006)
|
|
15
|
+
assert_equal 'Tue', Month.day_short(10, 10, 2006)
|
|
16
|
+
assert_equal 'Wed', Month.day_short(11, 10, 2006)
|
|
17
|
+
assert_equal 'Thu', Month.day_short(12, 10, 2006)
|
|
18
|
+
assert_equal 'Fri', Month.day_short(13, 10, 2006)
|
|
19
|
+
assert_equal 'Sat', Month.day_short(14, 10, 2006)
|
|
20
|
+
assert_equal 'Sun', Month.day_short(15, 10, 2006)
|
|
21
|
+
assert_equal 'Mon', Month.day_short(16, 10, 2006)
|
|
22
|
+
assert_equal 'Tue', Month.day_short(17, 10, 2006)
|
|
23
|
+
assert_equal 'Wed', Month.day_short(18, 10, 2006)
|
|
24
|
+
assert_equal 'Thu', Month.day_short(19, 10, 2006)
|
|
25
|
+
assert_equal 'Fri', Month.day_short(20, 10, 2006)
|
|
26
|
+
assert_equal 'Sat', Month.day_short(21, 10, 2006)
|
|
27
|
+
assert_equal 'Sun', Month.day_short(22, 10, 2006)
|
|
28
|
+
assert_equal 'Mon', Month.day_short(23, 10, 2006)
|
|
29
|
+
assert_equal 'Tue', Month.day_short(24, 10, 2006)
|
|
30
|
+
assert_equal 'Wed', Month.day_short(25, 10, 2006)
|
|
31
|
+
assert_equal 'Thu', Month.day_short(26, 10, 2006)
|
|
32
|
+
assert_equal 'Fri', Month.day_short(27, 10, 2006)
|
|
33
|
+
assert_equal 'Sat', Month.day_short(28, 10, 2006)
|
|
34
|
+
assert_equal 'Sun', Month.day_short(29, 10, 2006)
|
|
35
|
+
assert_equal 'Mon', Month.day_short(30, 10, 2006)
|
|
36
|
+
assert_equal 'Tue', Month.day_short(31, 10, 2006)
|
|
37
|
+
assert_equal 'Wed', Month.day_short(1, 11, 2006)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def test_num_as_string
|
|
41
|
+
assert_equal 'Sun', Month.day_short('1', '10', '2006')
|
|
42
|
+
assert_equal 'Mon', Month.day_short('2', '10', '2006')
|
|
43
|
+
assert_equal 'Tue', Month.day_short('3', '10', '2006')
|
|
44
|
+
assert_equal 'Wed', Month.day_short('4', '10', '2006')
|
|
45
|
+
assert_equal 'Thu', Month.day_short('5', '10', '2006')
|
|
46
|
+
assert_equal 'Fri', Month.day_short('6', '10', '2006')
|
|
47
|
+
assert_equal 'Sat', Month.day_short('7', '10', '2006')
|
|
48
|
+
assert_equal 'Sun', Month.day_short('8', '10', '2006')
|
|
49
|
+
assert_equal 'Mon', Month.day_short('9', '10', '2006')
|
|
50
|
+
assert_equal 'Tue', Month.day_short('10', '10', '2006')
|
|
51
|
+
assert_equal 'Wed', Month.day_short('11', '10', '2006')
|
|
52
|
+
assert_equal 'Thu', Month.day_short('12', '10', '2006')
|
|
53
|
+
assert_equal 'Fri', Month.day_short('13', '10', '2006')
|
|
54
|
+
assert_equal 'Sat', Month.day_short('14', '10', '2006')
|
|
55
|
+
assert_equal 'Sun', Month.day_short('15', '10', '2006')
|
|
56
|
+
assert_equal 'Mon', Month.day_short('16', '10', '2006')
|
|
57
|
+
assert_equal 'Tue', Month.day_short('17', '10', '2006')
|
|
58
|
+
assert_equal 'Wed', Month.day_short('18', '10', '2006')
|
|
59
|
+
assert_equal 'Thu', Month.day_short('19', '10', '2006')
|
|
60
|
+
assert_equal 'Fri', Month.day_short('20', '10', '2006')
|
|
61
|
+
assert_equal 'Sat', Month.day_short('21', '10', '2006')
|
|
62
|
+
assert_equal 'Sun', Month.day_short('22', '10', '2006')
|
|
63
|
+
assert_equal 'Mon', Month.day_short('23', '10', '2006')
|
|
64
|
+
assert_equal 'Tue', Month.day_short('24', '10', '2006')
|
|
65
|
+
assert_equal 'Wed', Month.day_short('25', '10', '2006')
|
|
66
|
+
assert_equal 'Thu', Month.day_short('26', '10', '2006')
|
|
67
|
+
assert_equal 'Fri', Month.day_short('27', '10', '2006')
|
|
68
|
+
assert_equal 'Sat', Month.day_short('28', '10', '2006')
|
|
69
|
+
assert_equal 'Sun', Month.day_short('29', '10', '2006')
|
|
70
|
+
assert_equal 'Mon', Month.day_short('30', '10', '2006')
|
|
71
|
+
assert_equal 'Tue', Month.day_short('31', '10', '2006')
|
|
72
|
+
assert_equal 'Wed', Month.day_short('1', '11', '2006')
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_num_as_num_with_defaults
|
|
76
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
77
|
+
assert_equal 'Sun', Month.day_short(1)
|
|
78
|
+
assert_equal 'Mon', Month.day_short(2)
|
|
79
|
+
assert_equal 'Tue', Month.day_short(3)
|
|
80
|
+
assert_equal 'Wed', Month.day_short(4)
|
|
81
|
+
assert_equal 'Thu', Month.day_short(5)
|
|
82
|
+
assert_equal 'Fri', Month.day_short(6)
|
|
83
|
+
assert_equal 'Sat', Month.day_short(7)
|
|
84
|
+
assert_equal 'Sun', Month.day_short(8)
|
|
85
|
+
assert_equal 'Mon', Month.day_short(9)
|
|
86
|
+
assert_equal 'Tue', Month.day_short(10)
|
|
87
|
+
assert_equal 'Wed', Month.day_short(11)
|
|
88
|
+
assert_equal 'Thu', Month.day_short(12)
|
|
89
|
+
assert_equal 'Fri', Month.day_short(13)
|
|
90
|
+
assert_equal 'Sat', Month.day_short(14)
|
|
91
|
+
assert_equal 'Sun', Month.day_short(15)
|
|
92
|
+
assert_equal 'Mon', Month.day_short(16)
|
|
93
|
+
assert_equal 'Tue', Month.day_short(17)
|
|
94
|
+
assert_equal 'Wed', Month.day_short(18)
|
|
95
|
+
assert_equal 'Thu', Month.day_short(19)
|
|
96
|
+
assert_equal 'Fri', Month.day_short(20)
|
|
97
|
+
assert_equal 'Sat', Month.day_short(21)
|
|
98
|
+
assert_equal 'Sun', Month.day_short(22)
|
|
99
|
+
assert_equal 'Mon', Month.day_short(23)
|
|
100
|
+
assert_equal 'Tue', Month.day_short(24)
|
|
101
|
+
assert_equal 'Wed', Month.day_short(25)
|
|
102
|
+
assert_equal 'Thu', Month.day_short(26)
|
|
103
|
+
assert_equal 'Fri', Month.day_short(27)
|
|
104
|
+
assert_equal 'Sat', Month.day_short(28)
|
|
105
|
+
assert_equal 'Sun', Month.day_short(29)
|
|
106
|
+
assert_equal 'Mon', Month.day_short(30)
|
|
107
|
+
assert_equal 'Tue', Month.day_short(31)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def test_num_as_string_with_defaults
|
|
112
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
113
|
+
assert_equal 'Sun', Month.day_short('1')
|
|
114
|
+
assert_equal 'Mon', Month.day_short('2')
|
|
115
|
+
assert_equal 'Tue', Month.day_short('3')
|
|
116
|
+
assert_equal 'Wed', Month.day_short('4')
|
|
117
|
+
assert_equal 'Thu', Month.day_short('5')
|
|
118
|
+
assert_equal 'Fri', Month.day_short('6')
|
|
119
|
+
assert_equal 'Sat', Month.day_short('7')
|
|
120
|
+
assert_equal 'Sun', Month.day_short('8')
|
|
121
|
+
assert_equal 'Mon', Month.day_short('9')
|
|
122
|
+
assert_equal 'Tue', Month.day_short('10')
|
|
123
|
+
assert_equal 'Wed', Month.day_short('11')
|
|
124
|
+
assert_equal 'Thu', Month.day_short('12')
|
|
125
|
+
assert_equal 'Fri', Month.day_short('13')
|
|
126
|
+
assert_equal 'Sat', Month.day_short('14')
|
|
127
|
+
assert_equal 'Sun', Month.day_short('15')
|
|
128
|
+
assert_equal 'Mon', Month.day_short('16')
|
|
129
|
+
assert_equal 'Tue', Month.day_short('17')
|
|
130
|
+
assert_equal 'Wed', Month.day_short('18')
|
|
131
|
+
assert_equal 'Thu', Month.day_short('19')
|
|
132
|
+
assert_equal 'Fri', Month.day_short('20')
|
|
133
|
+
assert_equal 'Sat', Month.day_short('21')
|
|
134
|
+
assert_equal 'Sun', Month.day_short('22')
|
|
135
|
+
assert_equal 'Mon', Month.day_short('23')
|
|
136
|
+
assert_equal 'Tue', Month.day_short('24')
|
|
137
|
+
assert_equal 'Wed', Month.day_short('25')
|
|
138
|
+
assert_equal 'Thu', Month.day_short('26')
|
|
139
|
+
assert_equal 'Fri', Month.day_short('27')
|
|
140
|
+
assert_equal 'Sat', Month.day_short('28')
|
|
141
|
+
assert_equal 'Sun', Month.day_short('29')
|
|
142
|
+
assert_equal 'Mon', Month.day_short('30')
|
|
143
|
+
assert_equal 'Tue', Month.day_short('31')
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def test_crap
|
|
148
|
+
assert_nil Month.day_short('random')
|
|
149
|
+
assert_nil Month.day_short(32)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# test/tc_Month_self.day_shortest.rb
|
|
2
|
+
|
|
3
|
+
class TC_Month_self_day_shortest < Minitest::Test
|
|
4
|
+
|
|
5
|
+
def test_num_as_num
|
|
6
|
+
assert_equal 'Su', Month.day_shortest(1, 10, 2006)
|
|
7
|
+
assert_equal 'Mo', Month.day_shortest(2, 10, 2006)
|
|
8
|
+
assert_equal 'Tu', Month.day_shortest(3, 10, 2006)
|
|
9
|
+
assert_equal 'We', Month.day_shortest(4, 10, 2006)
|
|
10
|
+
assert_equal 'Th', Month.day_shortest(5, 10, 2006)
|
|
11
|
+
assert_equal 'Fr', Month.day_shortest(6, 10, 2006)
|
|
12
|
+
assert_equal 'Sa', Month.day_shortest(7, 10, 2006)
|
|
13
|
+
assert_equal 'Su', Month.day_shortest(8, 10, 2006)
|
|
14
|
+
assert_equal 'Mo', Month.day_shortest(9, 10, 2006)
|
|
15
|
+
assert_equal 'Tu', Month.day_shortest(10, 10, 2006)
|
|
16
|
+
assert_equal 'We', Month.day_shortest(11, 10, 2006)
|
|
17
|
+
assert_equal 'Th', Month.day_shortest(12, 10, 2006)
|
|
18
|
+
assert_equal 'Fr', Month.day_shortest(13, 10, 2006)
|
|
19
|
+
assert_equal 'Sa', Month.day_shortest(14, 10, 2006)
|
|
20
|
+
assert_equal 'Su', Month.day_shortest(15, 10, 2006)
|
|
21
|
+
assert_equal 'Mo', Month.day_shortest(16, 10, 2006)
|
|
22
|
+
assert_equal 'Tu', Month.day_shortest(17, 10, 2006)
|
|
23
|
+
assert_equal 'We', Month.day_shortest(18, 10, 2006)
|
|
24
|
+
assert_equal 'Th', Month.day_shortest(19, 10, 2006)
|
|
25
|
+
assert_equal 'Fr', Month.day_shortest(20, 10, 2006)
|
|
26
|
+
assert_equal 'Sa', Month.day_shortest(21, 10, 2006)
|
|
27
|
+
assert_equal 'Su', Month.day_shortest(22, 10, 2006)
|
|
28
|
+
assert_equal 'Mo', Month.day_shortest(23, 10, 2006)
|
|
29
|
+
assert_equal 'Tu', Month.day_shortest(24, 10, 2006)
|
|
30
|
+
assert_equal 'We', Month.day_shortest(25, 10, 2006)
|
|
31
|
+
assert_equal 'Th', Month.day_shortest(26, 10, 2006)
|
|
32
|
+
assert_equal 'Fr', Month.day_shortest(27, 10, 2006)
|
|
33
|
+
assert_equal 'Sa', Month.day_shortest(28, 10, 2006)
|
|
34
|
+
assert_equal 'Su', Month.day_shortest(29, 10, 2006)
|
|
35
|
+
assert_equal 'Mo', Month.day_shortest(30, 10, 2006)
|
|
36
|
+
assert_equal 'Tu', Month.day_shortest(31, 10, 2006)
|
|
37
|
+
assert_equal 'We', Month.day_shortest(1, 11, 2006)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def test_num_as_string
|
|
41
|
+
assert_equal 'Su', Month.day_shortest('1', '10', '2006')
|
|
42
|
+
assert_equal 'Mo', Month.day_shortest('2', '10', '2006')
|
|
43
|
+
assert_equal 'Tu', Month.day_shortest('3', '10', '2006')
|
|
44
|
+
assert_equal 'We', Month.day_shortest('4', '10', '2006')
|
|
45
|
+
assert_equal 'Th', Month.day_shortest('5', '10', '2006')
|
|
46
|
+
assert_equal 'Fr', Month.day_shortest('6', '10', '2006')
|
|
47
|
+
assert_equal 'Sa', Month.day_shortest('7', '10', '2006')
|
|
48
|
+
assert_equal 'Su', Month.day_shortest('8', '10', '2006')
|
|
49
|
+
assert_equal 'Mo', Month.day_shortest('9', '10', '2006')
|
|
50
|
+
assert_equal 'Tu', Month.day_shortest('10', '10', '2006')
|
|
51
|
+
assert_equal 'We', Month.day_shortest('11', '10', '2006')
|
|
52
|
+
assert_equal 'Th', Month.day_shortest('12', '10', '2006')
|
|
53
|
+
assert_equal 'Fr', Month.day_shortest('13', '10', '2006')
|
|
54
|
+
assert_equal 'Sa', Month.day_shortest('14', '10', '2006')
|
|
55
|
+
assert_equal 'Su', Month.day_shortest('15', '10', '2006')
|
|
56
|
+
assert_equal 'Mo', Month.day_shortest('16', '10', '2006')
|
|
57
|
+
assert_equal 'Tu', Month.day_shortest('17', '10', '2006')
|
|
58
|
+
assert_equal 'We', Month.day_shortest('18', '10', '2006')
|
|
59
|
+
assert_equal 'Th', Month.day_shortest('19', '10', '2006')
|
|
60
|
+
assert_equal 'Fr', Month.day_shortest('20', '10', '2006')
|
|
61
|
+
assert_equal 'Sa', Month.day_shortest('21', '10', '2006')
|
|
62
|
+
assert_equal 'Su', Month.day_shortest('22', '10', '2006')
|
|
63
|
+
assert_equal 'Mo', Month.day_shortest('23', '10', '2006')
|
|
64
|
+
assert_equal 'Tu', Month.day_shortest('24', '10', '2006')
|
|
65
|
+
assert_equal 'We', Month.day_shortest('25', '10', '2006')
|
|
66
|
+
assert_equal 'Th', Month.day_shortest('26', '10', '2006')
|
|
67
|
+
assert_equal 'Fr', Month.day_shortest('27', '10', '2006')
|
|
68
|
+
assert_equal 'Sa', Month.day_shortest('28', '10', '2006')
|
|
69
|
+
assert_equal 'Su', Month.day_shortest('29', '10', '2006')
|
|
70
|
+
assert_equal 'Mo', Month.day_shortest('30', '10', '2006')
|
|
71
|
+
assert_equal 'Tu', Month.day_shortest('31', '10', '2006')
|
|
72
|
+
assert_equal 'We', Month.day_shortest('1', '11', '2006')
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_num_as_num_with_defaults
|
|
76
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
77
|
+
assert_equal 'Su', Month.day_shortest(1)
|
|
78
|
+
assert_equal 'Mo', Month.day_shortest(2)
|
|
79
|
+
assert_equal 'Tu', Month.day_shortest(3)
|
|
80
|
+
assert_equal 'We', Month.day_shortest(4)
|
|
81
|
+
assert_equal 'Th', Month.day_shortest(5)
|
|
82
|
+
assert_equal 'Fr', Month.day_shortest(6)
|
|
83
|
+
assert_equal 'Sa', Month.day_shortest(7)
|
|
84
|
+
assert_equal 'Su', Month.day_shortest(8)
|
|
85
|
+
assert_equal 'Mo', Month.day_shortest(9)
|
|
86
|
+
assert_equal 'Tu', Month.day_shortest(10)
|
|
87
|
+
assert_equal 'We', Month.day_shortest(11)
|
|
88
|
+
assert_equal 'Th', Month.day_shortest(12)
|
|
89
|
+
assert_equal 'Fr', Month.day_shortest(13)
|
|
90
|
+
assert_equal 'Sa', Month.day_shortest(14)
|
|
91
|
+
assert_equal 'Su', Month.day_shortest(15)
|
|
92
|
+
assert_equal 'Mo', Month.day_shortest(16)
|
|
93
|
+
assert_equal 'Tu', Month.day_shortest(17)
|
|
94
|
+
assert_equal 'We', Month.day_shortest(18)
|
|
95
|
+
assert_equal 'Th', Month.day_shortest(19)
|
|
96
|
+
assert_equal 'Fr', Month.day_shortest(20)
|
|
97
|
+
assert_equal 'Sa', Month.day_shortest(21)
|
|
98
|
+
assert_equal 'Su', Month.day_shortest(22)
|
|
99
|
+
assert_equal 'Mo', Month.day_shortest(23)
|
|
100
|
+
assert_equal 'Tu', Month.day_shortest(24)
|
|
101
|
+
assert_equal 'We', Month.day_shortest(25)
|
|
102
|
+
assert_equal 'Th', Month.day_shortest(26)
|
|
103
|
+
assert_equal 'Fr', Month.day_shortest(27)
|
|
104
|
+
assert_equal 'Sa', Month.day_shortest(28)
|
|
105
|
+
assert_equal 'Su', Month.day_shortest(29)
|
|
106
|
+
assert_equal 'Mo', Month.day_shortest(30)
|
|
107
|
+
assert_equal 'Tu', Month.day_shortest(31)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def test_num_as_string_with_defaults
|
|
112
|
+
if Date.today.year == 2006 && Date.today.month == 10
|
|
113
|
+
assert_equal 'Su', Month.day_shortest('1')
|
|
114
|
+
assert_equal 'Mo', Month.day_shortest('2')
|
|
115
|
+
assert_equal 'Tu', Month.day_shortest('3')
|
|
116
|
+
assert_equal 'We', Month.day_shortest('4')
|
|
117
|
+
assert_equal 'Th', Month.day_shortest('5')
|
|
118
|
+
assert_equal 'Fr', Month.day_shortest('6')
|
|
119
|
+
assert_equal 'Sa', Month.day_shortest('7')
|
|
120
|
+
assert_equal 'Su', Month.day_shortest('8')
|
|
121
|
+
assert_equal 'Mo', Month.day_shortest('9')
|
|
122
|
+
assert_equal 'Tu', Month.day_shortest('10')
|
|
123
|
+
assert_equal 'We', Month.day_shortest('11')
|
|
124
|
+
assert_equal 'Th', Month.day_shortest('12')
|
|
125
|
+
assert_equal 'Fr', Month.day_shortest('13')
|
|
126
|
+
assert_equal 'Sa', Month.day_shortest('14')
|
|
127
|
+
assert_equal 'Su', Month.day_shortest('15')
|
|
128
|
+
assert_equal 'Mo', Month.day_shortest('16')
|
|
129
|
+
assert_equal 'Tu', Month.day_shortest('17')
|
|
130
|
+
assert_equal 'We', Month.day_shortest('18')
|
|
131
|
+
assert_equal 'Th', Month.day_shortest('19')
|
|
132
|
+
assert_equal 'Fr', Month.day_shortest('20')
|
|
133
|
+
assert_equal 'Sa', Month.day_shortest('21')
|
|
134
|
+
assert_equal 'Su', Month.day_shortest('22')
|
|
135
|
+
assert_equal 'Mo', Month.day_shortest('23')
|
|
136
|
+
assert_equal 'Tu', Month.day_shortest('24')
|
|
137
|
+
assert_equal 'We', Month.day_shortest('25')
|
|
138
|
+
assert_equal 'Th', Month.day_shortest('26')
|
|
139
|
+
assert_equal 'Fr', Month.day_shortest('27')
|
|
140
|
+
assert_equal 'Sa', Month.day_shortest('28')
|
|
141
|
+
assert_equal 'Su', Month.day_shortest('29')
|
|
142
|
+
assert_equal 'Mo', Month.day_shortest('30')
|
|
143
|
+
assert_equal 'Tu', Month.day_shortest('31')
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def test_crap
|
|
148
|
+
assert_nil Month.day_shortest('random')
|
|
149
|
+
assert_nil Month.day_shortest(32)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# test/tc_Month_self.days.rb
|
|
2
|
+
|
|
3
|
+
class TC_Month_self_days < Minitest::Test
|
|
4
|
+
|
|
5
|
+
def test_long_capitalized
|
|
6
|
+
assert_equal 31, Month.days('January')
|
|
7
|
+
if Date.today.year == 2006
|
|
8
|
+
assert_equal 28, Month.days('February')
|
|
9
|
+
end
|
|
10
|
+
assert_equal 28, Month.days(2007, 'February')
|
|
11
|
+
assert_equal 29, Month.days(2008, 'February')
|
|
12
|
+
assert_equal 31, Month.days('March')
|
|
13
|
+
assert_equal 30, Month.days('April')
|
|
14
|
+
assert_equal 31, Month.days('May')
|
|
15
|
+
assert_equal 30, Month.days('June')
|
|
16
|
+
assert_equal 31, Month.days('July')
|
|
17
|
+
assert_equal 31, Month.days('August')
|
|
18
|
+
assert_equal 30, Month.days('September')
|
|
19
|
+
assert_equal 31, Month.days('October')
|
|
20
|
+
assert_equal 30, Month.days('November')
|
|
21
|
+
assert_equal 31, Month.days('December')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_long_downcase
|
|
25
|
+
assert_equal 31, Month.days('january')
|
|
26
|
+
if Date.today.year == 2006
|
|
27
|
+
assert_equal 28, Month.days('february')
|
|
28
|
+
end
|
|
29
|
+
assert_equal 28, Month.days(2007, 'february')
|
|
30
|
+
assert_equal 29, Month.days(2008, 'february')
|
|
31
|
+
assert_equal 31, Month.days('march')
|
|
32
|
+
assert_equal 30, Month.days('april')
|
|
33
|
+
assert_equal 31, Month.days('may')
|
|
34
|
+
assert_equal 30, Month.days('june')
|
|
35
|
+
assert_equal 31, Month.days('july')
|
|
36
|
+
assert_equal 31, Month.days('august')
|
|
37
|
+
assert_equal 30, Month.days('september')
|
|
38
|
+
assert_equal 31, Month.days('october')
|
|
39
|
+
assert_equal 30, Month.days('november')
|
|
40
|
+
assert_equal 31, Month.days('december')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def test_short_capitalized
|
|
44
|
+
assert_equal 31, Month.days('Jan')
|
|
45
|
+
if Date.today.year == 2006
|
|
46
|
+
assert_equal 28, Month.days('Feb')
|
|
47
|
+
end
|
|
48
|
+
assert_equal 28, Month.days(2007, 'Feb')
|
|
49
|
+
assert_equal 29, Month.days(2008, 'Feb')
|
|
50
|
+
assert_equal 31, Month.days('Mar')
|
|
51
|
+
assert_equal 30, Month.days('Apr')
|
|
52
|
+
assert_equal 31, Month.days('May')
|
|
53
|
+
assert_equal 30, Month.days('Jun')
|
|
54
|
+
assert_equal 31, Month.days('Jul')
|
|
55
|
+
assert_equal 31, Month.days('Aug')
|
|
56
|
+
assert_equal 30, Month.days('Sep')
|
|
57
|
+
assert_equal 31, Month.days('Oct')
|
|
58
|
+
assert_equal 30, Month.days('Nov')
|
|
59
|
+
assert_equal 31, Month.days('Dec')
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def test_short_downcase
|
|
63
|
+
assert_equal 31, Month.days('jan')
|
|
64
|
+
if Date.today.year == 2006
|
|
65
|
+
assert_equal 28, Month.days('feb')
|
|
66
|
+
end
|
|
67
|
+
assert_equal 28, Month.days(2007, 'feb')
|
|
68
|
+
assert_equal 29, Month.days(2008, 'feb')
|
|
69
|
+
assert_equal 31, Month.days('mar')
|
|
70
|
+
assert_equal 30, Month.days('apr')
|
|
71
|
+
assert_equal 31, Month.days('may')
|
|
72
|
+
assert_equal 30, Month.days('jun')
|
|
73
|
+
assert_equal 31, Month.days('jul')
|
|
74
|
+
assert_equal 31, Month.days('aug')
|
|
75
|
+
assert_equal 30, Month.days('sep')
|
|
76
|
+
assert_equal 31, Month.days('oct')
|
|
77
|
+
assert_equal 30, Month.days('nov')
|
|
78
|
+
assert_equal 31, Month.days('dec')
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def test_num_as_num
|
|
82
|
+
assert_equal 31, Month.days(1)
|
|
83
|
+
if Date.today.year == 2006
|
|
84
|
+
assert_equal 28, Month.days(2)
|
|
85
|
+
end
|
|
86
|
+
assert_equal 28, Month.days(2007, 2)
|
|
87
|
+
assert_equal 29, Month.days(2008, 2)
|
|
88
|
+
assert_equal 31, Month.days(3)
|
|
89
|
+
assert_equal 30, Month.days(4)
|
|
90
|
+
assert_equal 31, Month.days(5)
|
|
91
|
+
assert_equal 30, Month.days(6)
|
|
92
|
+
assert_equal 31, Month.days(7)
|
|
93
|
+
assert_equal 31, Month.days(8)
|
|
94
|
+
assert_equal 30, Month.days(9)
|
|
95
|
+
assert_equal 31, Month.days(10)
|
|
96
|
+
assert_equal 30, Month.days(11)
|
|
97
|
+
assert_equal 31, Month.days(12)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def test_num_as_string
|
|
101
|
+
assert_equal 31, Month.days('1')
|
|
102
|
+
if Date.today.year == 2006
|
|
103
|
+
assert_equal 28, Month.days('2')
|
|
104
|
+
end
|
|
105
|
+
assert_equal 28, Month.days(2007, '2')
|
|
106
|
+
assert_equal 29, Month.days(2008, '2')
|
|
107
|
+
assert_equal 31, Month.days('3')
|
|
108
|
+
assert_equal 30, Month.days('4')
|
|
109
|
+
assert_equal 31, Month.days('5')
|
|
110
|
+
assert_equal 30, Month.days('6')
|
|
111
|
+
assert_equal 31, Month.days('7')
|
|
112
|
+
assert_equal 31, Month.days('8')
|
|
113
|
+
assert_equal 30, Month.days('9')
|
|
114
|
+
assert_equal 31, Month.days('10')
|
|
115
|
+
assert_equal 30, Month.days('11')
|
|
116
|
+
assert_equal 31, Month.days('12')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def test_crap
|
|
120
|
+
assert_nil Month.days('random')
|
|
121
|
+
assert_nil Month.days(13)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
end
|