singapore_cpf_calculator 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/singapore_cpf_calculator.rb +2 -0
- data/lib/singapore_cpf_calculator/age_group.rb +34 -11
- data/lib/singapore_cpf_calculator/base_calculator.rb +1 -0
- data/lib/singapore_cpf_calculator/requirements.rb +1 -0
- data/lib/singapore_cpf_calculator/requirements/group_55_years_and_below.rb +13 -0
- data/lib/singapore_cpf_calculator/version.rb +1 -1
- data/lib/singapore_cpf_calculator/year_2015.rb +1 -1
- data/lib/singapore_cpf_calculator/year_2016.rb +38 -0
- data/lib/singapore_cpf_calculator/year_2016/base.rb +17 -0
- data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3.rb +33 -0
- data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_fg.rb +35 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_gg.rb +34 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_65_up_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_fg.rb +34 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_gg.rb +34 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3_spec.rb +10 -10
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg_spec.rb +10 -10
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg_spec.rb +11 -11
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg_spec.rb +11 -11
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg_spec.rb +11 -11
- data/spec/singapore_cpf_calculator/year_2015_spec.rb +3 -3
- data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3_spec.rb +158 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_fg_spec.rb +158 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_1_gg_spec.rb +158 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_fg_spec.rb +158 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2016/spr_2_gg_spec.rb +158 -0
- data/spec/singapore_cpf_calculator/year_2016_spec.rb +187 -0
- data/spec/spec_helper.rb +3 -3
- metadata +82 -3
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2016
|
3
|
+
module SPR2GG
|
4
|
+
|
5
|
+
# Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
|
6
|
+
class Age55To60ContributionCalculator < Year2016::Base
|
7
|
+
|
8
|
+
extend Requirements::GroupAbove55To60Years
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def tc_rate_1
|
13
|
+
"0.06"
|
14
|
+
end
|
15
|
+
|
16
|
+
def tc_rate_2
|
17
|
+
"0.185"
|
18
|
+
end
|
19
|
+
|
20
|
+
def ec_rate
|
21
|
+
"0.125"
|
22
|
+
end
|
23
|
+
|
24
|
+
def adjustment_rate
|
25
|
+
"0.375"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2016
|
3
|
+
module SPR2GG
|
4
|
+
|
5
|
+
# Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
|
6
|
+
class Age60To65ContributionCalculator < Year2016::Base
|
7
|
+
|
8
|
+
extend Requirements::GroupAbove60To65Years
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def tc_rate_1
|
13
|
+
"0.035"
|
14
|
+
end
|
15
|
+
|
16
|
+
def tc_rate_2
|
17
|
+
"0.11"
|
18
|
+
end
|
19
|
+
|
20
|
+
def ec_rate
|
21
|
+
"0.075"
|
22
|
+
end
|
23
|
+
|
24
|
+
def adjustment_rate
|
25
|
+
"0.225"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2016
|
3
|
+
module SPR2GG
|
4
|
+
|
5
|
+
# Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
|
6
|
+
class Age65UpContributionCalculator < Year2016::Base
|
7
|
+
|
8
|
+
extend Requirements::GroupAbove65Years
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def tc_rate_1
|
13
|
+
"0.035"
|
14
|
+
end
|
15
|
+
|
16
|
+
def tc_rate_2
|
17
|
+
"0.085"
|
18
|
+
end
|
19
|
+
|
20
|
+
def ec_rate
|
21
|
+
"0.05"
|
22
|
+
end
|
23
|
+
|
24
|
+
def adjustment_rate
|
25
|
+
"0.15"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -79,7 +79,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
79
79
|
|
80
80
|
describe "calculator_for" do
|
81
81
|
let(:calculator) { mod.calculator_for(current_date, birthdate: birthdate) }
|
82
|
-
let(:current_date) { Date.new(
|
82
|
+
let(:current_date) { Date.new(2015, 9, 15) }
|
83
83
|
|
84
84
|
context "when the employee's age is 50 or below" do
|
85
85
|
context "lower limit" do
|
@@ -92,7 +92,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
context "upper limit" do
|
95
|
-
let(:birthdate) { Date.new(
|
95
|
+
let(:birthdate) { Date.new(1965, 9, 15) }
|
96
96
|
it {
|
97
97
|
expect( calculator ).
|
98
98
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age50BelowContributionCalculator
|
@@ -102,7 +102,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
102
102
|
|
103
103
|
context "when the employee's age is above 50 to 55" do
|
104
104
|
context "lower limit" do
|
105
|
-
let(:birthdate) { Date.new(
|
105
|
+
let(:birthdate) { Date.new(1964, 8, 15) }
|
106
106
|
it {
|
107
107
|
expect( calculator ).
|
108
108
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age50To55ContributionCalculator
|
@@ -110,7 +110,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
context "upper limit" do
|
113
|
-
let(:birthdate) { Date.new(
|
113
|
+
let(:birthdate) { Date.new(1960, 9, 15) }
|
114
114
|
it {
|
115
115
|
expect( calculator ).
|
116
116
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age50To55ContributionCalculator
|
@@ -120,7 +120,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
120
120
|
|
121
121
|
context "when the employee's age is above 55 to 60" do
|
122
122
|
context "lower limit" do
|
123
|
-
let(:birthdate) { Date.new(
|
123
|
+
let(:birthdate) { Date.new(1959, 8, 15) }
|
124
124
|
it {
|
125
125
|
expect( calculator ).
|
126
126
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age55To60ContributionCalculator
|
@@ -128,7 +128,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
context "upper limit" do
|
131
|
-
let(:birthdate) { Date.new(
|
131
|
+
let(:birthdate) { Date.new(1955, 9, 15) }
|
132
132
|
it {
|
133
133
|
expect( calculator ).
|
134
134
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age55To60ContributionCalculator
|
@@ -138,7 +138,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
138
138
|
|
139
139
|
context "when the employee's age is above 60 to 65" do
|
140
140
|
context "lower limit" do
|
141
|
-
let(:birthdate) { Date.new(
|
141
|
+
let(:birthdate) { Date.new(1954, 8, 15) }
|
142
142
|
it {
|
143
143
|
expect( calculator ).
|
144
144
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age60To65ContributionCalculator
|
@@ -146,7 +146,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
146
146
|
end
|
147
147
|
|
148
148
|
context "upper limit" do
|
149
|
-
let(:birthdate) { Date.new(
|
149
|
+
let(:birthdate) { Date.new(1950, 9, 15) }
|
150
150
|
it {
|
151
151
|
expect( calculator ).
|
152
152
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age60To65ContributionCalculator
|
@@ -156,7 +156,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
156
156
|
|
157
157
|
context "when the employee's age is 65 or above" do
|
158
158
|
context "lower limit" do
|
159
|
-
let(:birthdate) { Date.new(
|
159
|
+
let(:birthdate) { Date.new(1949, 8, 15) }
|
160
160
|
it {
|
161
161
|
expect( calculator ).
|
162
162
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age65UpContributionCalculator
|
@@ -164,7 +164,7 @@ describe SingaporeCPFCalculator::Year2015::CitizenOrSPR3 do
|
|
164
164
|
end
|
165
165
|
|
166
166
|
context "upper limit" do
|
167
|
-
let(:birthdate) { Date.new(
|
167
|
+
let(:birthdate) { Date.new(1915, 8, 15) }
|
168
168
|
it {
|
169
169
|
expect( calculator ).
|
170
170
|
to be SingaporeCPFCalculator::Year2015::CitizenOrSPR3::Age65UpContributionCalculator
|
@@ -79,7 +79,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
79
79
|
|
80
80
|
describe "calculator_for" do
|
81
81
|
let(:calculator) { mod.calculator_for(current_date, birthdate: birthdate) }
|
82
|
-
let(:current_date) { Date.new(
|
82
|
+
let(:current_date) { Date.new(2015, 9, 15) }
|
83
83
|
|
84
84
|
context "when the employee's age is 50 or below" do
|
85
85
|
context "lower limit" do
|
@@ -92,7 +92,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
context "upper limit" do
|
95
|
-
let(:birthdate) { Date.new(
|
95
|
+
let(:birthdate) { Date.new(1965, 9, 15) }
|
96
96
|
it {
|
97
97
|
expect( calculator ).
|
98
98
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age50BelowContributionCalculator
|
@@ -102,7 +102,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
102
102
|
|
103
103
|
context "when the employee's age is above 50 to 55" do
|
104
104
|
context "lower limit" do
|
105
|
-
let(:birthdate) { Date.new(
|
105
|
+
let(:birthdate) { Date.new(1964, 8, 15) }
|
106
106
|
it {
|
107
107
|
expect( calculator ).
|
108
108
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age50To55ContributionCalculator
|
@@ -110,7 +110,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
context "upper limit" do
|
113
|
-
let(:birthdate) { Date.new(
|
113
|
+
let(:birthdate) { Date.new(1960, 9, 15) }
|
114
114
|
it {
|
115
115
|
expect( calculator ).
|
116
116
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age50To55ContributionCalculator
|
@@ -120,7 +120,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
120
120
|
|
121
121
|
context "when the employee's age is above 55 to 60" do
|
122
122
|
context "lower limit" do
|
123
|
-
let(:birthdate) { Date.new(
|
123
|
+
let(:birthdate) { Date.new(1959, 8, 15) }
|
124
124
|
it {
|
125
125
|
expect( calculator ).
|
126
126
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age55To60ContributionCalculator
|
@@ -128,7 +128,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
context "upper limit" do
|
131
|
-
let(:birthdate) { Date.new(
|
131
|
+
let(:birthdate) { Date.new(1955, 9, 15) }
|
132
132
|
it {
|
133
133
|
expect( calculator ).
|
134
134
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age55To60ContributionCalculator
|
@@ -138,7 +138,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
138
138
|
|
139
139
|
context "when the employee's age is above 60 to 65" do
|
140
140
|
context "lower limit" do
|
141
|
-
let(:birthdate) { Date.new(
|
141
|
+
let(:birthdate) { Date.new(1954, 8, 15) }
|
142
142
|
it {
|
143
143
|
expect( calculator ).
|
144
144
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age60To65ContributionCalculator
|
@@ -146,7 +146,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
146
146
|
end
|
147
147
|
|
148
148
|
context "upper limit" do
|
149
|
-
let(:birthdate) { Date.new(
|
149
|
+
let(:birthdate) { Date.new(1950, 9, 15) }
|
150
150
|
it {
|
151
151
|
expect( calculator ).
|
152
152
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age60To65ContributionCalculator
|
@@ -156,7 +156,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
156
156
|
|
157
157
|
context "when the employee's age is 65 or above" do
|
158
158
|
context "lower limit" do
|
159
|
-
let(:birthdate) { Date.new(
|
159
|
+
let(:birthdate) { Date.new(1949, 8, 15) }
|
160
160
|
it {
|
161
161
|
expect( calculator ).
|
162
162
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age65UpContributionCalculator
|
@@ -164,7 +164,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1FG do
|
|
164
164
|
end
|
165
165
|
|
166
166
|
context "upper limit" do
|
167
|
-
let(:birthdate) { Date.new(
|
167
|
+
let(:birthdate) { Date.new(1915, 8, 15) }
|
168
168
|
it {
|
169
169
|
expect( calculator ).
|
170
170
|
to be SingaporeCPFCalculator::Year2015::SPR1FG::Age65UpContributionCalculator
|
@@ -79,11 +79,11 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
79
79
|
|
80
80
|
describe "calculator_for" do
|
81
81
|
let(:calculator) { mod.calculator_for(current_date, birthdate: birthdate) }
|
82
|
-
let(:current_date) { Date.new(
|
82
|
+
let(:current_date) { Date.new(2015, 9, 15) }
|
83
83
|
|
84
84
|
context "when the employee's age is 50 or below" do
|
85
85
|
context "lower limit" do
|
86
|
-
let(:birthdate) { Date.new(
|
86
|
+
let(:birthdate) { Date.new(1997, 8, 15) }
|
87
87
|
|
88
88
|
it {
|
89
89
|
expect( calculator ).
|
@@ -92,7 +92,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
context "upper limit" do
|
95
|
-
let(:birthdate) { Date.new(
|
95
|
+
let(:birthdate) { Date.new(1965, 9, 15) }
|
96
96
|
it {
|
97
97
|
expect( calculator ).
|
98
98
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age50BelowContributionCalculator
|
@@ -102,7 +102,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
102
102
|
|
103
103
|
context "when the employee's age is above 50 to 55" do
|
104
104
|
context "lower limit" do
|
105
|
-
let(:birthdate) { Date.new(
|
105
|
+
let(:birthdate) { Date.new(1964, 8, 15) }
|
106
106
|
it {
|
107
107
|
expect( calculator ).
|
108
108
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age50To55ContributionCalculator
|
@@ -110,7 +110,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
context "upper limit" do
|
113
|
-
let(:birthdate) { Date.new(
|
113
|
+
let(:birthdate) { Date.new(1960, 9, 15) }
|
114
114
|
it {
|
115
115
|
expect( calculator ).
|
116
116
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age50To55ContributionCalculator
|
@@ -120,7 +120,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
120
120
|
|
121
121
|
context "when the employee's age is above 55 to 60" do
|
122
122
|
context "lower limit" do
|
123
|
-
let(:birthdate) { Date.new(
|
123
|
+
let(:birthdate) { Date.new(1959, 8, 15) }
|
124
124
|
it {
|
125
125
|
expect( calculator ).
|
126
126
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age55To60ContributionCalculator
|
@@ -128,7 +128,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
context "upper limit" do
|
131
|
-
let(:birthdate) { Date.new(
|
131
|
+
let(:birthdate) { Date.new(1955, 9, 15) }
|
132
132
|
it {
|
133
133
|
expect( calculator ).
|
134
134
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age55To60ContributionCalculator
|
@@ -138,7 +138,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
138
138
|
|
139
139
|
context "when the employee's age is above 60 to 65" do
|
140
140
|
context "lower limit" do
|
141
|
-
let(:birthdate) { Date.new(
|
141
|
+
let(:birthdate) { Date.new(1954, 8, 15) }
|
142
142
|
it {
|
143
143
|
expect( calculator ).
|
144
144
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age60To65ContributionCalculator
|
@@ -146,7 +146,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
146
146
|
end
|
147
147
|
|
148
148
|
context "upper limit" do
|
149
|
-
let(:birthdate) { Date.new(
|
149
|
+
let(:birthdate) { Date.new(1950, 9, 15) }
|
150
150
|
it {
|
151
151
|
expect( calculator ).
|
152
152
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age60To65ContributionCalculator
|
@@ -156,7 +156,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
156
156
|
|
157
157
|
context "when the employee's age is 65 or above" do
|
158
158
|
context "lower limit" do
|
159
|
-
let(:birthdate) { Date.new(
|
159
|
+
let(:birthdate) { Date.new(1949, 8, 15) }
|
160
160
|
it {
|
161
161
|
expect( calculator ).
|
162
162
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age65UpContributionCalculator
|
@@ -164,7 +164,7 @@ describe SingaporeCPFCalculator::Year2015::SPR1GG do
|
|
164
164
|
end
|
165
165
|
|
166
166
|
context "upper limit" do
|
167
|
-
let(:birthdate) { Date.new(
|
167
|
+
let(:birthdate) { Date.new(1915, 8, 15) }
|
168
168
|
it {
|
169
169
|
expect( calculator ).
|
170
170
|
to be SingaporeCPFCalculator::Year2015::SPR1GG::Age65UpContributionCalculator
|
@@ -79,11 +79,11 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
79
79
|
|
80
80
|
describe "calculator_for" do
|
81
81
|
let(:calculator) { mod.calculator_for(current_date, birthdate: birthdate) }
|
82
|
-
let(:current_date) { Date.new(
|
82
|
+
let(:current_date) { Date.new(2015, 9, 15) }
|
83
83
|
|
84
84
|
context "when the employee's age is 50 or below" do
|
85
85
|
context "lower limit" do
|
86
|
-
let(:birthdate) { Date.new(
|
86
|
+
let(:birthdate) { Date.new(1997, 8, 15) }
|
87
87
|
|
88
88
|
it {
|
89
89
|
expect( calculator ).
|
@@ -92,7 +92,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
context "upper limit" do
|
95
|
-
let(:birthdate) { Date.new(
|
95
|
+
let(:birthdate) { Date.new(1965, 9, 15) }
|
96
96
|
it {
|
97
97
|
expect( calculator ).
|
98
98
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age50BelowContributionCalculator
|
@@ -102,7 +102,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
102
102
|
|
103
103
|
context "when the employee's age is above 50 to 55" do
|
104
104
|
context "lower limit" do
|
105
|
-
let(:birthdate) { Date.new(
|
105
|
+
let(:birthdate) { Date.new(1964, 8, 15) }
|
106
106
|
it {
|
107
107
|
expect( calculator ).
|
108
108
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age50To55ContributionCalculator
|
@@ -110,7 +110,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
context "upper limit" do
|
113
|
-
let(:birthdate) { Date.new(
|
113
|
+
let(:birthdate) { Date.new(1960, 9, 15) }
|
114
114
|
it {
|
115
115
|
expect( calculator ).
|
116
116
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age50To55ContributionCalculator
|
@@ -120,7 +120,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
120
120
|
|
121
121
|
context "when the employee's age is above 55 to 60" do
|
122
122
|
context "lower limit" do
|
123
|
-
let(:birthdate) { Date.new(
|
123
|
+
let(:birthdate) { Date.new(1959, 8, 15) }
|
124
124
|
it {
|
125
125
|
expect( calculator ).
|
126
126
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age55To60ContributionCalculator
|
@@ -128,7 +128,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
context "upper limit" do
|
131
|
-
let(:birthdate) { Date.new(
|
131
|
+
let(:birthdate) { Date.new(1955, 9, 15) }
|
132
132
|
it {
|
133
133
|
expect( calculator ).
|
134
134
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age55To60ContributionCalculator
|
@@ -138,7 +138,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
138
138
|
|
139
139
|
context "when the employee's age is above 60 to 65" do
|
140
140
|
context "lower limit" do
|
141
|
-
let(:birthdate) { Date.new(
|
141
|
+
let(:birthdate) { Date.new(1954, 8, 15) }
|
142
142
|
it {
|
143
143
|
expect( calculator ).
|
144
144
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age60To65ContributionCalculator
|
@@ -146,7 +146,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
146
146
|
end
|
147
147
|
|
148
148
|
context "upper limit" do
|
149
|
-
let(:birthdate) { Date.new(
|
149
|
+
let(:birthdate) { Date.new(1950, 9, 15) }
|
150
150
|
it {
|
151
151
|
expect( calculator ).
|
152
152
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age60To65ContributionCalculator
|
@@ -156,7 +156,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
156
156
|
|
157
157
|
context "when the employee's age is 65 or above" do
|
158
158
|
context "lower limit" do
|
159
|
-
let(:birthdate) { Date.new(
|
159
|
+
let(:birthdate) { Date.new(1949, 8, 15) }
|
160
160
|
it {
|
161
161
|
expect( calculator ).
|
162
162
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age65UpContributionCalculator
|
@@ -164,7 +164,7 @@ describe SingaporeCPFCalculator::Year2015::SPR2FG do
|
|
164
164
|
end
|
165
165
|
|
166
166
|
context "upper limit" do
|
167
|
-
let(:birthdate) { Date.new(
|
167
|
+
let(:birthdate) { Date.new(1915, 8, 15) }
|
168
168
|
it {
|
169
169
|
expect( calculator ).
|
170
170
|
to be SingaporeCPFCalculator::Year2015::SPR2FG::Age65UpContributionCalculator
|