merch_calendar 0.1.0.rc2 → 0.1.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +53 -50
- data/lib/merch_calendar/fiscal_year_calendar.rb +64 -8
- data/lib/merch_calendar/retail_calendar.rb +13 -8
- data/lib/merch_calendar/version.rb +1 -1
- data/spec/merch_calendar/fiscal_year_calendar_spec.rb +103 -91
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 529c719788c4f0aada0e215af345aa00ec9d055f
|
4
|
+
data.tar.gz: 79f5749368eff3b9607649efac54ec8a54cacbd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cbcf6b7df354163f93069a82f9f05a60882cd129be90335777c30b39dd735065fa851dce568c13a986d660654a8e610df81cc1ced035340b7e473f63f1fea41
|
7
|
+
data.tar.gz: f363bb9980350ccc5867679301afb2380d67b99a6bd60cf3472122e922ca62b6c07e5ff1a9733223d1ee5f5a60f3d6e191f601ac28c44d4956c3634f0be5853a
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -49,82 +49,85 @@ puts merch_week.to_s(:long) # "2013:48 Dec W5"
|
|
49
49
|
puts merch_week.to_s(:elasticsearch) # "2013-12w05"
|
50
50
|
```
|
51
51
|
|
52
|
-
This can also be used on the `MerchCalendar` module. All `start_` and `end_` methods can be called, along with a few additional ones.
|
53
52
|
|
54
|
-
|
55
|
-
# All examples below return a Date object for the start of May within the 2014 merch year
|
56
|
-
MerchCalendar.start_of_month(2014, 5)
|
57
|
-
MerchCalendar.start_of_month(2014, month: 5)
|
58
|
-
MerchCalendar.start_of_month(2014, julian_month: 5)
|
59
|
-
|
60
|
-
# This is the same as May, because "Merch" months are shifted by 1.
|
61
|
-
# i.e. month 1 is actually February
|
62
|
-
# You probably will never use this, but it is available.
|
63
|
-
MerchCalendar.start_of_month(2014, merch_month: 4)
|
64
|
-
```
|
53
|
+
### Merch retail calendar
|
65
54
|
|
66
|
-
|
67
|
-
|
68
|
-
Merch calendars have the first month in February, and the last (12th) month is in January of the following year. In the code block above, each method is *asking* a very different question. This will definitely cause confusion, so here are some explanations.
|
55
|
+
Merch calendars have their first month in February, and the last (12th) month is in January of the
|
56
|
+
following year.
|
69
57
|
|
70
58
|
```ruby
|
71
|
-
# This is asking "In the Merch year of 2014,
|
72
|
-
#
|
73
|
-
|
74
|
-
MerchCalendar.start_of_month(2014, 1)
|
75
|
-
MerchCalendar.start_of_month(2014, month: 1)
|
76
|
-
MerchCalendar.start_of_month(2014, julian_month: 1)
|
77
|
-
# => 2015-01-04
|
78
|
-
# ^^^^ - NEXT year
|
59
|
+
# This is asking "In the Merch year of 2014, what is the Gregorian calendar date of
|
60
|
+
# the start of the first month?"
|
61
|
+
retail_calendar = MerchCalendar::RetailCalendar.new
|
79
62
|
|
80
|
-
|
81
|
-
MerchCalendar.start_of_month(2014, merch_month: 1)
|
63
|
+
retail_calendar.start_of_month(2014, 1)
|
82
64
|
# => 2014-02-02
|
83
65
|
|
66
|
+
retail_calendar.start_of_month(2014, 12)
|
67
|
+
# => 2015-01-04
|
84
68
|
```
|
85
69
|
|
86
70
|
This table should describe the progression of dates:
|
87
71
|
|
88
|
-
| N
|
89
|
-
| ------------- | ------------- |
|
90
|
-
| 1
|
91
|
-
| 2
|
92
|
-
| 3
|
93
|
-
| 4
|
94
|
-
| 5
|
95
|
-
| 6
|
96
|
-
| 7
|
97
|
-
| 8
|
98
|
-
| 9
|
99
|
-
| 10 | 2014-
|
100
|
-
| 11 | 2014-11-
|
101
|
-
| 12 |
|
72
|
+
| N | `start_of_month(2014, N)` |
|
73
|
+
| ------------- | ------------- |
|
74
|
+
| 1 | 2014-02-02 |
|
75
|
+
| 2 | 2014-03-02 |
|
76
|
+
| 3 | 2014-04-06 |
|
77
|
+
| 4 | 2014-05-04 |
|
78
|
+
| 5 | 2014-06-01 |
|
79
|
+
| 6 | 2014-07-06 |
|
80
|
+
| 7 | 2014-08-03 |
|
81
|
+
| 8 | 2014-08-31 |
|
82
|
+
| 9 | 2014-10-05 |
|
83
|
+
| 10 | 2014-11-02 |
|
84
|
+
| 11 | 2014-11-30 |
|
85
|
+
| 12 | 2015-01-04 |
|
102
86
|
|
103
87
|
|
104
88
|
Other useful methods:
|
105
89
|
|
106
90
|
```ruby
|
107
91
|
# 52 or 53 (depending on leap year)
|
108
|
-
|
92
|
+
retail_calendar.weeks_in_year(2016)
|
93
|
+
# => 52
|
94
|
+
retail_calendar.weeks_in_year(2017)
|
95
|
+
# => 53
|
96
|
+
|
97
|
+
# get the start date of a given merch week
|
98
|
+
retail_calendar.start_of_week(2017, 4, 1)
|
99
|
+
# => #<Date: 2017-04-30 ((2457874j,0s,0n),+0s,2299161j)>
|
100
|
+
|
101
|
+
# get the end date of a given merch week
|
102
|
+
retail_calendar.end_of_week(2017, 4, 1)
|
103
|
+
#=> #<Date: 2017-05-06 ((2457880j,0s,0n),+0s,2299161j)>
|
104
|
+
```
|
105
|
+
|
106
|
+
### Offset fiscal year calendars
|
107
|
+
Some companies, one of which being Stitch Fix, operate on a fiscal year calendar that is offset of
|
108
|
+
the traditional retail calendar. The `MerchCalendar::FiscalYearCalendar` class allows you to easily
|
109
|
+
offset the start of year to match your fiscal calendar.
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
fiscal_calendar = MerchCalendar::FiscalYearCalendar.new
|
109
113
|
|
110
|
-
#
|
111
|
-
|
114
|
+
# 52 or 53 (depending on leap year)
|
115
|
+
fiscal_calendar.weeks_in_year(2017)
|
116
|
+
# => 52
|
117
|
+
fiscal_calendar.weeks_in_year(2018)
|
118
|
+
# => 53
|
112
119
|
|
113
120
|
# get the start date of a given merch week
|
114
|
-
|
115
|
-
# => #<Date:
|
121
|
+
fiscal_calendar.start_of_week(2017, 1, 1)
|
122
|
+
# => #<Date: 2016-07-31 ((2457601j,0s,0n),+0s,2299161j)>
|
116
123
|
|
117
124
|
# get the end date of a given merch week
|
118
|
-
|
119
|
-
|
125
|
+
fiscal_calendar.end_of_week(2017, 4, 1)
|
126
|
+
#=> #<Date: 2017-05-06 ((2457880j,0s,0n),+0s,2299161j)>
|
120
127
|
```
|
121
128
|
|
122
129
|
## Documentation
|
123
130
|
You can view the documentation for this gem on [RubyDoc.info](http://www.rubydoc.info/github/stitchfix/merch_calendar/master).
|
124
131
|
|
125
|
-
|
126
|
-
## Roadmap
|
127
|
-
* Support for 4-4-5 calendars
|
128
|
-
|
129
132
|
## License
|
130
133
|
MerchCalendar is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
@@ -2,17 +2,38 @@ require "merch_calendar/retail_calendar"
|
|
2
2
|
|
3
3
|
module MerchCalendar
|
4
4
|
class FiscalYearCalendar
|
5
|
-
|
5
|
+
# Stitch Fix's fiscal year starts two quarters *before* (hence the negative number) the start of the
|
6
|
+
# merch/retail calendar year.
|
7
|
+
STITCH_FIX_FY_QUARTER_OFFSET = -2
|
8
|
+
|
9
|
+
QUARTER_1 = 1
|
10
|
+
QUARTER_4 = 4
|
11
|
+
|
12
|
+
# @param fy_quarter_offset [Fixnum]
|
13
|
+
# The number of quarters before or after the start of the traditional NRF retail calendar that the year
|
14
|
+
# should begin.
|
15
|
+
# ex) Stitch Fix's fiscal year calendar starts in August of the prior gregorian calendar year.
|
16
|
+
# February 2017 = Traditional retail month 1, year 2017
|
17
|
+
# August 2016 = Offset retail month 1, year 2017 (2 quarters earlier)
|
18
|
+
def initialize(fy_quarter_offset = STITCH_FIX_FY_QUARTER_OFFSET)
|
19
|
+
@fy_quarter_offset = fy_quarter_offset
|
20
|
+
|
21
|
+
# TODO: support other fiscal year offsets
|
22
|
+
if fy_quarter_offset != STITCH_FIX_FY_QUARTER_OFFSET
|
23
|
+
raise NotImplementedError.new("FY quarter offset of #{fy_quarter_offset} not yet supported")
|
24
|
+
end
|
25
|
+
|
6
26
|
@retail_calendar = RetailCalendar.new
|
7
27
|
end
|
8
28
|
|
9
|
-
# The
|
29
|
+
# The date of the first day of the year
|
10
30
|
def start_of_year(year)
|
11
|
-
start_of_quarter(year,
|
31
|
+
start_of_quarter(year, QUARTER_1)
|
12
32
|
end
|
13
33
|
|
34
|
+
# The date of the last day of the year
|
14
35
|
def end_of_year(year)
|
15
|
-
end_of_quarter(year,
|
36
|
+
end_of_quarter(year, QUARTER_4)
|
16
37
|
end
|
17
38
|
|
18
39
|
# Return the starting date for a particular quarter
|
@@ -25,10 +46,18 @@ module MerchCalendar
|
|
25
46
|
@retail_calendar.end_of_quarter(*offset_quarter(year, quarter))
|
26
47
|
end
|
27
48
|
|
49
|
+
# The date of the first day of the merch month
|
50
|
+
# @param [Fixnum] year - the fiscal year
|
51
|
+
# @param [Fixnum] merch_month - the nth month of the offset calendar
|
52
|
+
# ex) for an offset of +/- 2 quarters, month 1 = August
|
28
53
|
def start_of_month(year, merch_month)
|
29
54
|
@retail_calendar.start_of_month(*offset_month(year, merch_month))
|
30
55
|
end
|
31
56
|
|
57
|
+
# The date of the last day of the merch month
|
58
|
+
# @param [Fixnum] year - the fiscal year
|
59
|
+
# @param [Fixnum] merch_month - the nth month of the offset calendar
|
60
|
+
# ex) for an offset of +/- 2 quarters, month 1 = August
|
32
61
|
def end_of_month(year, merch_month)
|
33
62
|
@retail_calendar.end_of_month(*offset_month(year, merch_month))
|
34
63
|
end
|
@@ -43,20 +72,47 @@ module MerchCalendar
|
|
43
72
|
@retail_calendar.end_of_week(*offset_month(year, merch_month), merch_week)
|
44
73
|
end
|
45
74
|
|
75
|
+
# Returns the number of weeks in the fiscal year
|
46
76
|
def weeks_in_year(year)
|
47
|
-
@retail_calendar.weeks_in_year(year
|
77
|
+
@retail_calendar.weeks_in_year(offset_year(year))
|
48
78
|
end
|
49
79
|
|
50
80
|
private
|
51
81
|
|
82
|
+
# Offsets the quarter based on the fiscal year quarter offset
|
83
|
+
# returns: ofset [year, quarter]
|
52
84
|
def offset_quarter(year, quarter)
|
53
85
|
# first quarter in fiscal calendar is Q3 of retail calendar of previous year
|
54
|
-
|
86
|
+
if quarter >= 1 + @fy_quarter_offset.abs
|
87
|
+
[year, quarter + @fy_quarter_offset]
|
88
|
+
else
|
89
|
+
[year - 1, quarter - @fy_quarter_offset]
|
90
|
+
end
|
55
91
|
end
|
56
92
|
|
93
|
+
# Offsets the month based on the fiscal year quarter offset
|
94
|
+
# returns: ofset [year, month]
|
57
95
|
def offset_month(year, month)
|
58
|
-
#
|
59
|
-
|
96
|
+
# 3 - number of months in a quarter
|
97
|
+
month_offset = @fy_quarter_offset * 3
|
98
|
+
|
99
|
+
if month >= (month_offset.abs + 1)
|
100
|
+
[year, month + month_offset]
|
101
|
+
else
|
102
|
+
[year - 1, month - month_offset]
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Offsets the year based on the fiscal year quarter offset
|
107
|
+
# returns: ofset year
|
108
|
+
def offset_year(year)
|
109
|
+
if @fy_quarter_offset < 0
|
110
|
+
year -= 1
|
111
|
+
elsif @fy_quarter_offset > 0
|
112
|
+
year += 1
|
113
|
+
else
|
114
|
+
year
|
115
|
+
end
|
60
116
|
end
|
61
117
|
end
|
62
118
|
end
|
@@ -2,6 +2,11 @@ require "date"
|
|
2
2
|
|
3
3
|
module MerchCalendar
|
4
4
|
class RetailCalendar
|
5
|
+
QUARTER_1 = 1
|
6
|
+
QUARTER_2 = 2
|
7
|
+
QUARTER_3 = 3
|
8
|
+
QUARTER_4 = 4
|
9
|
+
|
5
10
|
def end_of_year(year)
|
6
11
|
year_end = Date.new((year + 1), 1, -1)
|
7
12
|
wday = (year_end.wday + 1) % 7
|
@@ -61,13 +66,13 @@ module MerchCalendar
|
|
61
66
|
# Return the starting date for a particular quarter
|
62
67
|
def start_of_quarter(year, quarter)
|
63
68
|
case quarter
|
64
|
-
when
|
69
|
+
when QUARTER_1
|
65
70
|
start_of_month(year, 1)
|
66
|
-
when
|
71
|
+
when QUARTER_2
|
67
72
|
start_of_month(year, 4)
|
68
|
-
when
|
73
|
+
when QUARTER_3
|
69
74
|
start_of_month(year, 7)
|
70
|
-
when
|
75
|
+
when QUARTER_4
|
71
76
|
start_of_month(year, 10)
|
72
77
|
end
|
73
78
|
end
|
@@ -75,13 +80,13 @@ module MerchCalendar
|
|
75
80
|
# Return the ending date for a particular quarter
|
76
81
|
def end_of_quarter(year, quarter)
|
77
82
|
case quarter
|
78
|
-
when
|
83
|
+
when QUARTER_1
|
79
84
|
end_of_month(year, 3)
|
80
|
-
when
|
85
|
+
when QUARTER_2
|
81
86
|
end_of_month(year, 6)
|
82
|
-
when
|
87
|
+
when QUARTER_3
|
83
88
|
end_of_month(year, 9)
|
84
|
-
when
|
89
|
+
when QUARTER_4
|
85
90
|
end_of_month(year, 12)
|
86
91
|
end
|
87
92
|
end
|
@@ -1,133 +1,145 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe MerchCalendar::FiscalYearCalendar do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
context "the default fy_offset - 2 quarters earlier" do
|
5
|
+
describe "#weeks_in_year" do
|
6
|
+
it "returns 53 for a leap year - 2013" do
|
7
|
+
expect(subject.weeks_in_year(2013)).to eq 53
|
8
|
+
end
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
it "returns 52 for a normal year" do
|
11
|
+
expect(subject.weeks_in_year(2014)).to eq 52
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
it "returns 52 for a normal year" do
|
15
|
+
expect(subject.weeks_in_year(2015)).to eq 52
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
it "returns 52 for a normal year" do
|
19
|
+
expect(subject.weeks_in_year(2016)).to eq 52
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
it "returns 52 for a normal year" do
|
23
|
+
expect(subject.weeks_in_year(2017)).to eq 52
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
it "returns 53 for a leap year - 2018" do
|
27
|
+
expect(subject.weeks_in_year(2018)).to eq 53
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
it "returns 52 for a normal year" do
|
31
|
+
expect(subject.weeks_in_year(2019)).to eq 52
|
32
|
+
end
|
31
33
|
end
|
32
|
-
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
describe "#start_of_week" do
|
36
|
+
it "returns the correct date for 2017-1-1 (2017-Aug-wk1)" do
|
37
|
+
expect(subject.start_of_week(2017, 1, 1)).to eq Date.new(2016, 7, 31)
|
38
|
+
end
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
it "returns the correct Date for 2018-1-1 (2018-Aug-wk1)" do
|
41
|
+
expect(subject.start_of_week(2018, 1, 1)).to eq Date.new(2017, 7, 30)
|
42
|
+
end
|
42
43
|
|
43
|
-
|
44
|
-
|
44
|
+
it "returns the correct Date for 2019-1-1 (2019-Aug-wk1)" do
|
45
|
+
expect(subject.start_of_week(2019, 1, 1)).to eq Date.new(2018, 8, 5)
|
46
|
+
end
|
45
47
|
end
|
46
|
-
end
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
describe "#end_of_week" do
|
50
|
+
it "returns the correct date for 2017-6-1 (2017-Jan-wk1)" do
|
51
|
+
expect(subject.end_of_week(2017, 6, 1)).to eq Date.new(2017, 1, 7)
|
52
|
+
end
|
52
53
|
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
it "returns the correct Date for 2018-6-5 (2018-Jan-wk5)" do
|
55
|
+
expect(subject.end_of_week(2018, 6, 5)).to eq Date.new(2018, 2, 3)
|
56
|
+
end
|
56
57
|
|
57
|
-
|
58
|
-
|
58
|
+
it "returns the correct Date for 2019-10-3 (2019-May-wk3)" do
|
59
|
+
expect(subject.end_of_week(2019, 10, 3)).to eq Date.new(2019, 5, 25)
|
60
|
+
end
|
59
61
|
end
|
60
|
-
end
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
describe "#start_of_month" do
|
64
|
+
it "returns the correct date for 2018-1 AKA 2018-Aug" do
|
65
|
+
expect(subject.start_of_month(2018, 1)).to eq Date.new(2017, 7, 30)
|
66
|
+
end
|
66
67
|
|
67
|
-
|
68
|
-
|
68
|
+
it "returns the correct date for 2019-1 AKA 2019-Aug" do
|
69
|
+
expect(subject.start_of_month(2019, 1)).to eq Date.new(2018, 8, 5)
|
70
|
+
end
|
69
71
|
end
|
70
|
-
end
|
71
72
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
describe "#end_of_month" do
|
74
|
+
it "returns the correct date for 2018-1 AKA 2018-Aug" do
|
75
|
+
expect(subject.end_of_month(2018, 1)).to eq Date.new(2017, 8, 26)
|
76
|
+
end
|
76
77
|
|
77
|
-
|
78
|
-
|
78
|
+
it "returns the correct date for 2019-1 AKA 2019-Aug" do
|
79
|
+
expect(subject.end_of_month(2019, 1)).to eq Date.new(2018, 9, 1)
|
80
|
+
end
|
79
81
|
end
|
80
|
-
end
|
81
82
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
describe "#start_of_quarter" do
|
84
|
+
it "returns the correct date for 2018-Q1" do
|
85
|
+
expect(subject.start_of_quarter(2018, 1)).to eq Date.new(2017, 7, 30)
|
86
|
+
end
|
86
87
|
|
87
|
-
|
88
|
-
|
89
|
-
|
88
|
+
it "returns the correct date for 2018-Q4" do
|
89
|
+
expect(subject.start_of_quarter(2018, 4)).to eq Date.new(2018, 5, 6)
|
90
|
+
end
|
90
91
|
|
91
|
-
|
92
|
-
|
92
|
+
it "returns the correct date for 2019-Q1" do
|
93
|
+
expect(subject.start_of_quarter(2019, 1)).to eq Date.new(2018, 8, 5)
|
94
|
+
end
|
93
95
|
end
|
94
|
-
end
|
95
96
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
describe "#end_of_quarter" do
|
98
|
+
it "returns the correct date for 2018-Q1" do
|
99
|
+
expect(subject.end_of_quarter(2018, 1)).to eq Date.new(2017, 10, 28)
|
100
|
+
end
|
100
101
|
|
101
|
-
|
102
|
-
|
103
|
-
|
102
|
+
it "returns the correct date for 2018-Q4" do
|
103
|
+
expect(subject.end_of_quarter(2018, 4)).to eq Date.new(2018, 8, 4)
|
104
|
+
end
|
104
105
|
|
105
|
-
|
106
|
-
|
106
|
+
it "returns the correct date for 2019-Q1" do
|
107
|
+
expect(subject.end_of_quarter(2019, 1)).to eq Date.new(2018, 11, 3)
|
108
|
+
end
|
107
109
|
end
|
108
|
-
end
|
109
110
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
describe "#start_of_year" do
|
112
|
+
it "returns the correct date for 2018" do
|
113
|
+
expect(subject.start_of_year(2018)).to eq Date.new(2017, 7, 30)
|
114
|
+
end
|
114
115
|
|
115
|
-
|
116
|
-
|
116
|
+
it "returns the correct date for 2019" do
|
117
|
+
expect(subject.start_of_year(2019)).to eq Date.new(2018, 8, 5)
|
118
|
+
end
|
117
119
|
end
|
118
|
-
end
|
119
120
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
describe "#end_of_year" do
|
122
|
+
it "returns the correct date for 2017" do
|
123
|
+
expect(subject.end_of_year(2017)).to eq Date.new(2017, 7, 29)
|
124
|
+
end
|
124
125
|
|
125
|
-
|
126
|
-
|
126
|
+
it "returns the correct date for 2018" do
|
127
|
+
expect(subject.end_of_year(2018)).to eq Date.new(2018, 8, 4)
|
128
|
+
end
|
129
|
+
|
130
|
+
it "returns the correct date for 2019" do
|
131
|
+
expect(subject.end_of_year(2019)).to eq Date.new(2019, 8, 3)
|
132
|
+
end
|
127
133
|
end
|
134
|
+
end
|
135
|
+
|
136
|
+
context "an alternative offset - 2 quarters after" do
|
137
|
+
subject { described_class.new(2) }
|
128
138
|
|
129
|
-
it "
|
130
|
-
expect
|
139
|
+
it "raises a NotImplementedError - this is still TODO" do
|
140
|
+
expect {
|
141
|
+
subject
|
142
|
+
}.to raise_error(NotImplementedError)
|
131
143
|
end
|
132
144
|
end
|
133
145
|
end
|