ae_bank_days 1.2.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/ae_bank_days.gemspec +10 -19
- data/lib/ae_bank_days/bank_day_helper.rb +22 -8
- data/lib/ae_bank_days/date_extensions.rb +6 -4
- data/lib/ae_bank_days/version.rb +1 -1
- data/lib/ae_bank_days.rb +1 -1
- metadata +14 -100
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -35
- data/README.rdoc +0 -17
- data/Rakefile +0 -22
- data/test/ae_bank_days/bank_day_helper_test.rb +0 -75
- data/test/ae_bank_days/date_extensions_test.rb +0 -46
- data/test/ae_bank_days_test.rb +0 -9
- data/test/test_helper.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afad1460d6fb8acce458d2ad2dfabb29843d1a630162bd5043c5eb897b841d86
|
4
|
+
data.tar.gz: 54bdb02650c7a97a1161a357435c3d33fceb6f4286edb2b4a804a4267b3c97ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4acb7565fd8647e9f9a705b29fe7ccd4a76ae943f54945a04c3a02028a5fe93e4ac559b0ab895208c6104f0641d45869ca8e7d87a684b0ac04de89be93b2414
|
7
|
+
data.tar.gz: cf0fd6a295074b5b53f3b25590d614cc0e9f2d97a7e5612b2857667e48215a6da755b29066a3a7e6ce834619591ecda515f735910d0c60b4c3d5878fdbeee005
|
data/LICENSE.txt
CHANGED
data/ae_bank_days.gemspec
CHANGED
@@ -1,31 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'ae_bank_days/version'
|
3
|
+
require_relative 'lib/ae_bank_days/version'
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'ae_bank_days'
|
9
7
|
spec.version = AeBankDays::VERSION
|
10
8
|
spec.platform = Gem::Platform::RUBY
|
11
|
-
spec.
|
12
|
-
spec.email =
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
spec.homepage = '
|
16
|
-
spec.
|
17
|
-
spec.
|
18
|
-
spec.files = Dir['**/*'].reject { |f| f[%r{^log/}] || f[%r{^pkg/}] }
|
19
|
-
spec.test_files = spec.files.grep(%r{^(test)/})
|
9
|
+
spec.author = 'AppFolio'
|
10
|
+
spec.email = 'opensource@appfolio.com'
|
11
|
+
spec.description = 'Gem for finding the next banking date.'
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = 'https://github.com/appfolio/ae_bank_days'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.files = Dir['**/*'].select { |f| f[%r{^(lib/|LICENSE.txt|.*gemspec)}] }
|
20
16
|
spec.require_paths = ['lib']
|
17
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.3')
|
21
18
|
|
22
19
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
23
20
|
|
24
|
-
spec.add_dependency('holidays', '
|
25
|
-
|
26
|
-
spec.add_development_dependency('bundler', ['>= 1.10.4', '< 3'])
|
27
|
-
spec.add_development_dependency('minitest', '>= 5.8')
|
28
|
-
spec.add_development_dependency('minitest-reporters', '>= 1.3')
|
29
|
-
spec.add_development_dependency('mocha', '>= 1.1')
|
30
|
-
spec.add_development_dependency('rake', '>= 12.0')
|
21
|
+
spec.add_dependency('holidays', ['>= 8.3', '< 9'])
|
31
22
|
end
|
@@ -11,23 +11,37 @@ module AeBankDays
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def next_banking_day(date, number_of_days: 0)
|
14
|
-
banking_day = date
|
14
|
+
banking_day = date.to_date
|
15
|
+
banking_day += 1
|
15
16
|
number_of_days.times do
|
16
|
-
banking_day
|
17
|
+
banking_day = current_or_next_banking_day(banking_day)
|
17
18
|
banking_day += 1
|
18
19
|
end
|
19
|
-
|
20
|
-
banking_day
|
20
|
+
|
21
|
+
current_or_next_banking_day(banking_day)
|
21
22
|
end
|
22
23
|
|
23
24
|
def previous_banking_day(date, number_of_days: 0)
|
24
|
-
banking_day = date
|
25
|
+
banking_day = date.to_date
|
26
|
+
banking_day -= 1
|
25
27
|
number_of_days.times do
|
26
|
-
banking_day
|
28
|
+
banking_day = current_or_previous_banking_day(banking_day)
|
27
29
|
banking_day -= 1
|
28
30
|
end
|
29
|
-
|
30
|
-
banking_day
|
31
|
+
|
32
|
+
current_or_previous_banking_day(banking_day)
|
33
|
+
end
|
34
|
+
|
35
|
+
def current_or_previous_banking_day(day)
|
36
|
+
date = day.to_date
|
37
|
+
date -= 1 until bank_day?(date)
|
38
|
+
date
|
39
|
+
end
|
40
|
+
|
41
|
+
def current_or_next_banking_day(day)
|
42
|
+
date = day.to_date
|
43
|
+
date += 1 until bank_day?(date)
|
44
|
+
date
|
31
45
|
end
|
32
46
|
|
33
47
|
private
|
@@ -1,15 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module AeBankDays
|
2
4
|
module DateExtensions
|
3
5
|
def bank_day?
|
4
6
|
BankDayHelper.bank_day?(self)
|
5
7
|
end
|
6
8
|
|
7
|
-
def next_banking_day(
|
8
|
-
BankDayHelper.next_banking_day(self, number_of_days:
|
9
|
+
def next_banking_day(number_of_days = 0)
|
10
|
+
BankDayHelper.next_banking_day(self, number_of_days: number_of_days)
|
9
11
|
end
|
10
12
|
|
11
|
-
def previous_banking_day(
|
12
|
-
BankDayHelper.previous_banking_day(self, number_of_days:
|
13
|
+
def previous_banking_day(number_of_days = 0)
|
14
|
+
BankDayHelper.previous_banking_day(self, number_of_days: number_of_days)
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
data/lib/ae_bank_days/version.rb
CHANGED
data/lib/ae_bank_days.rb
CHANGED
metadata
CHANGED
@@ -1,127 +1,48 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae_bank_days
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: holidays
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '8.3'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '8.3'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
19
|
+
version: '8.3'
|
34
20
|
- - "<"
|
35
21
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
37
|
-
type: :
|
22
|
+
version: '9'
|
23
|
+
type: :runtime
|
38
24
|
prerelease: false
|
39
25
|
version_requirements: !ruby/object:Gem::Requirement
|
40
26
|
requirements:
|
41
27
|
- - ">="
|
42
28
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
29
|
+
version: '8.3'
|
44
30
|
- - "<"
|
45
31
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
47
|
-
|
48
|
-
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '5.8'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '5.8'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: minitest-reporters
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.3'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.3'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: mocha
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.1'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '1.1'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: rake
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '12.0'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '12.0'
|
103
|
-
description: Gem for finding the next banking date
|
104
|
-
email:
|
105
|
-
- dev@appfolio.com
|
32
|
+
version: '9'
|
33
|
+
description: Gem for finding the next banking date.
|
34
|
+
email: opensource@appfolio.com
|
106
35
|
executables: []
|
107
36
|
extensions: []
|
108
37
|
extra_rdoc_files: []
|
109
38
|
files:
|
110
|
-
- Gemfile
|
111
|
-
- Gemfile.lock
|
112
39
|
- LICENSE.txt
|
113
|
-
- README.rdoc
|
114
|
-
- Rakefile
|
115
40
|
- ae_bank_days.gemspec
|
116
41
|
- lib/ae_bank_days.rb
|
117
42
|
- lib/ae_bank_days/bank_day_helper.rb
|
118
43
|
- lib/ae_bank_days/date_extensions.rb
|
119
44
|
- lib/ae_bank_days/version.rb
|
120
|
-
|
121
|
-
- test/ae_bank_days/date_extensions_test.rb
|
122
|
-
- test/ae_bank_days_test.rb
|
123
|
-
- test/test_helper.rb
|
124
|
-
homepage: http://github.com/appfolio/ae_bank_days
|
45
|
+
homepage: https://github.com/appfolio/ae_bank_days
|
125
46
|
licenses:
|
126
47
|
- MIT
|
127
48
|
metadata:
|
@@ -134,22 +55,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
55
|
requirements:
|
135
56
|
- - ">="
|
136
57
|
- !ruby/object:Gem::Version
|
137
|
-
version: 2.
|
138
|
-
- - "<"
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: '2.7'
|
58
|
+
version: 2.6.3
|
141
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
60
|
requirements:
|
143
61
|
- - ">="
|
144
62
|
- !ruby/object:Gem::Version
|
145
63
|
version: '0'
|
146
64
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
65
|
+
rubygems_version: 3.3.3
|
148
66
|
signing_key:
|
149
67
|
specification_version: 4
|
150
|
-
summary: Gem for finding the next banking date
|
151
|
-
test_files:
|
152
|
-
- test/ae_bank_days/bank_day_helper_test.rb
|
153
|
-
- test/ae_bank_days/date_extensions_test.rb
|
154
|
-
- test/ae_bank_days_test.rb
|
155
|
-
- test/test_helper.rb
|
68
|
+
summary: Gem for finding the next banking date.
|
69
|
+
test_files: []
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
ae_bank_days (1.2.0)
|
5
|
-
holidays (~> 8.3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ansi (1.5.0)
|
11
|
-
builder (3.2.4)
|
12
|
-
holidays (8.3.0)
|
13
|
-
minitest (5.11.3)
|
14
|
-
minitest-reporters (1.3.0)
|
15
|
-
ansi
|
16
|
-
builder
|
17
|
-
minitest (>= 5.0)
|
18
|
-
ruby-progressbar
|
19
|
-
mocha (1.11.2)
|
20
|
-
rake (12.3.3)
|
21
|
-
ruby-progressbar (1.10.1)
|
22
|
-
|
23
|
-
PLATFORMS
|
24
|
-
ruby
|
25
|
-
|
26
|
-
DEPENDENCIES
|
27
|
-
ae_bank_days!
|
28
|
-
bundler (>= 1.10.4, < 3)
|
29
|
-
minitest (>= 5.8)
|
30
|
-
minitest-reporters (>= 1.3)
|
31
|
-
mocha (>= 1.1)
|
32
|
-
rake (>= 12.0)
|
33
|
-
|
34
|
-
BUNDLED WITH
|
35
|
-
2.1.4
|
data/README.rdoc
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
= ae_bank_days
|
2
|
-
|
3
|
-
Simple utility to find the next banking day
|
4
|
-
|
5
|
-
== Contributing to ae_bank_days
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so it doesn't break in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so it can be cherry-picked around.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright © 2019-2020 AppFolio.
|
data/Rakefile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
|
6
|
-
begin
|
7
|
-
Bundler.setup(:default, :development)
|
8
|
-
rescue Bundler::BundlerError => e
|
9
|
-
warn e.message
|
10
|
-
warn 'Run `bundle install` to install missing gems'
|
11
|
-
exit e.status_code
|
12
|
-
end
|
13
|
-
|
14
|
-
require 'rake/testtask'
|
15
|
-
|
16
|
-
Rake::TestTask.new(:test) do |test|
|
17
|
-
test.libs << 'test'
|
18
|
-
test.pattern = 'test/**/*_test.rb'
|
19
|
-
test.verbose = true
|
20
|
-
end
|
21
|
-
|
22
|
-
task default: :test
|
@@ -1,75 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
|
5
|
-
module AeBankDays
|
6
|
-
class BankDayHelperTest < Minitest::Test
|
7
|
-
def test_bank_day__weekday
|
8
|
-
assert BankDayHelper.bank_day?(Date.civil(2017, 10, 3))
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_bank_day__weekend
|
12
|
-
refute BankDayHelper.bank_day?(Date.civil(2017, 10, 14))
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_bank_day__holiday
|
16
|
-
refute BankDayHelper.bank_day?(Date.civil(2017, 10, 9))
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_bank_day__saturday_holiday_is_not_observed_on_friday
|
20
|
-
# The federal bank does not observe holidays that fall on Saturday on the preceding Friday as is common.
|
21
|
-
# This test makes sure that these dates are not accidentally marked as holidays.
|
22
|
-
# July 4, 2020 fell on a Saturday. The day before was a generally observed federal holiday, but it was still
|
23
|
-
# a banking day due to the federal banks holiday rules.
|
24
|
-
assert BankDayHelper.bank_day?(Date.civil(2020, 6, 3))
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_next_banking_day__weekday
|
28
|
-
assert_equal Date.civil(2017, 10, 3), BankDayHelper.next_banking_day(Date.civil(2017, 10, 3))
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_next_banking_day__weekday__extra_days
|
32
|
-
assert_equal Date.civil(2017, 10, 6), BankDayHelper.next_banking_day(Date.civil(2017, 10, 3), number_of_days: 3)
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_next_banking_day__weekend
|
36
|
-
assert_equal Date.civil(2017, 10, 16), BankDayHelper.next_banking_day(Date.civil(2017, 10, 14))
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_next_banking_day__weekend__extra_days
|
40
|
-
assert_equal Date.civil(2017, 10, 19), BankDayHelper.next_banking_day(Date.civil(2017, 10, 14), number_of_days: 3)
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_next_banking_day__holiday
|
44
|
-
assert_equal Date.civil(2017, 10, 10), BankDayHelper.next_banking_day(Date.civil(2017, 10, 9))
|
45
|
-
end
|
46
|
-
|
47
|
-
def test_next_banking_day__holiday__extra_days
|
48
|
-
assert_equal Date.civil(2017, 10, 13), BankDayHelper.next_banking_day(Date.civil(2017, 10, 9), number_of_days: 3)
|
49
|
-
end
|
50
|
-
|
51
|
-
def test_previous_banking_day__weekday
|
52
|
-
assert_equal Date.civil(2017, 10, 3), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 3))
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_previous_banking_day__weekday__extra_days
|
56
|
-
assert_equal Date.civil(2017, 10, 3), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 6), number_of_days: 3)
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_previous_banking_day__weekend
|
60
|
-
assert_equal Date.civil(2017, 10, 13), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 14))
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_previous_banking_day__weekend__extra_days
|
64
|
-
assert_equal Date.civil(2017, 10, 10), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 14), number_of_days: 3)
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_previous_banking_day__holiday
|
68
|
-
assert_equal Date.civil(2017, 10, 6), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 9))
|
69
|
-
end
|
70
|
-
|
71
|
-
def test_previous_banking_day__holiday__extra_days
|
72
|
-
assert_equal Date.civil(2017, 10, 3), BankDayHelper.previous_banking_day(Date.civil(2017, 10, 9), number_of_days: 3)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
|
5
|
-
module AeBankDays
|
6
|
-
class DateExtensionsTest < Minitest::Test
|
7
|
-
def test_bank_day
|
8
|
-
date = Date.today
|
9
|
-
BankDayHelper.expects(:bank_day?).with(date).returns(true)
|
10
|
-
|
11
|
-
assert date.bank_day?
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_next_banking_day
|
15
|
-
date = Date.today
|
16
|
-
new_date = date + 2
|
17
|
-
BankDayHelper.expects(:next_banking_day).with(date, number_of_days: 2).returns(new_date)
|
18
|
-
|
19
|
-
assert_equal new_date, date.next_banking_day(2)
|
20
|
-
end
|
21
|
-
|
22
|
-
def test_next_banking_day__default
|
23
|
-
date = Date.today
|
24
|
-
new_date = date + 2
|
25
|
-
BankDayHelper.expects(:next_banking_day).with(date, number_of_days: 0).returns(new_date)
|
26
|
-
|
27
|
-
assert_equal new_date, date.next_banking_day
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_previous_banking_day
|
31
|
-
date = Date.today
|
32
|
-
new_date = date + 2
|
33
|
-
BankDayHelper.expects(:previous_banking_day).with(date, number_of_days: 2).returns(new_date)
|
34
|
-
|
35
|
-
assert_equal new_date, date.previous_banking_day(2)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_previous_banking_day__default
|
39
|
-
date = Date.today
|
40
|
-
new_date = date + 2
|
41
|
-
BankDayHelper.expects(:previous_banking_day).with(date, number_of_days: 0).returns(new_date)
|
42
|
-
|
43
|
-
assert_equal new_date, date.previous_banking_day
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
data/test/ae_bank_days_test.rb
DELETED
data/test/test_helper.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
|
6
|
-
begin
|
7
|
-
Bundler.setup(:default, :development)
|
8
|
-
rescue Bundler::BundlerError => e
|
9
|
-
warn e.message
|
10
|
-
warn 'Run `bundle install` to install missing gems'
|
11
|
-
exit e.status_code
|
12
|
-
end
|
13
|
-
|
14
|
-
require 'ae_bank_days'
|
15
|
-
require 'minitest/autorun'
|
16
|
-
require 'minitest/reporters'
|
17
|
-
require 'mocha/setup'
|
18
|
-
require 'time'
|
19
|
-
|
20
|
-
MiniTest::Reporters.use!
|