ibandit 0.11.22 → 0.11.23

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 03fd3b123a87b4af8d7e3162d14c250760c73973
4
- data.tar.gz: 7f6df9d62b84ce3c0fe4822ea411e5207aca1af7
2
+ SHA256:
3
+ metadata.gz: 0a541f50d4ef769df481b72fb36721389dee789f3b1999f20de23775f7523ef4
4
+ data.tar.gz: 6e4317de4d3169b29dc6622ee30fbcd8c8b35be6d442ce3a26a4368b5618c8d9
5
5
  SHA512:
6
- metadata.gz: e4e0e6b0e0aad1313031236bbb4d39a46f0692a75f1156a39db21b3de3a0c9d690e89ffe14215bcbe11132addd01a3fc08be5a554580ba534cdc5fb0bb9285f8
7
- data.tar.gz: 9e9958c1cbccb467ef84ca4e22e6d81a8563d90af3ce7cc095f098a00a5e71e253f110271aa6c5d4b466e6189f753c966755351bd85e66ff4e3b9ec7293f5f8f
6
+ metadata.gz: d1e7d29847abf410e11231539ba884fd0e542ea897a7ced9a888a737514fd33d76a8f5a67fbc66a87a1c714a89a39eab7fe9e44341e6073ab5fa7dafd7f5b459
7
+ data.tar.gz: c690750c7f99853e34f08d973f02e02da391e7e7b7795c4d16e2abdde2be577d1ade377a42d289092df012a3ef3b4c0d0c24f17081693f2d3ce7ecb630e9d174
@@ -1,6 +1,9 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
  inherit_gem:
3
- gc_ruboconfig: rubocop.yml
3
+ ruboconfig: rubocop.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.1
4
7
 
5
8
  # Limit lines to 80 characters.
6
9
  LineLength:
@@ -1,74 +1,27 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-10-18 09:23:39 +0100 using RuboCop version 0.58.2.
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2014-12-08 13:56:37 +0000 using RuboCop version 0.27.1.
4
3
  # The point is for the user to remove these configuration records
5
4
  # one by one as the offenses are removed from the code base.
6
5
  # Note that changes in the inspected code, or installation of new
7
6
  # versions of RuboCop, may require this file to be generated again.
8
7
 
9
- # Offense count: 10
8
+ # Offense count: 4
10
9
  Metrics/AbcSize:
11
- Max: 26
12
-
13
- # Offense count: 3
14
- Metrics/CyclomaticComplexity:
15
- Max: 8
10
+ Max: 28
16
11
 
17
12
  # Offense count: 1
18
- RSpec/DescribeClass:
19
- Exclude:
20
- - 'spec/ibandit/structure_spec.rb'
13
+ # Configuration parameters: CountComments.
14
+ Metrics/ClassLength:
15
+ Max: 110
21
16
 
22
17
  # Offense count: 1
23
- # Configuration parameters: Max.
24
- RSpec/ExampleLength:
25
- Exclude:
26
- - 'spec/ibandit/iban_spec.rb'
27
-
28
- # Offense count: 8
29
- # Configuration parameters: AggregateFailuresByDefault.
30
- RSpec/MultipleExpectations:
31
- Max: 2
32
-
33
- # Offense count: 13
34
- RSpec/NamedSubject:
35
- Exclude:
36
- - 'spec/ibandit/german_details_converter_spec.rb'
37
- - 'spec/ibandit/iban_spec.rb'
38
-
39
- # Offense count: 344
40
- RSpec/NestedGroups:
41
- Max: 6
42
-
43
- # Offense count: 3
44
- RSpec/ScatteredLet:
45
- Exclude:
46
- - 'spec/ibandit/iban_spec.rb'
47
-
48
- # Offense count: 18
49
- RSpec/ScatteredSetup:
50
- Exclude:
51
- - 'spec/ibandit/iban_assembler_spec.rb'
52
- - 'spec/ibandit/iban_spec.rb'
53
-
54
- # Offense count: 13
55
- RSpec/SubjectStub:
56
- Exclude:
57
- - 'spec/ibandit/iban_spec.rb'
18
+ Metrics/CyclomaticComplexity:
19
+ Max: 10
58
20
 
59
21
  # Offense count: 4
60
- # Configuration parameters: IgnoreSymbolicNames.
61
- RSpec/VerifiedDoubles:
62
- Exclude:
63
- - 'spec/ibandit/iban_spec.rb'
22
+ Style/Documentation:
23
+ Enabled: false
64
24
 
65
- # Offense count: 5
66
- # Cop supports --auto-correct.
67
- # Configuration parameters: AutoCorrect, EnforcedStyle.
68
- # SupportedStyles: predicate, comparison
25
+ # Offense count: 4
69
26
  Style/NumericPredicate:
70
- Exclude:
71
- - 'spec/**/*'
72
- - 'lib/ibandit/iban.rb'
73
- - 'lib/ibandit/pseudo_iban_assembler.rb'
74
- - 'lib/ibandit/pseudo_iban_splitter.rb'
27
+ Enabled: false
@@ -8,7 +8,6 @@ rvm:
8
8
  - 2.2.7
9
9
  - 2.3.4
10
10
  - 2.4.1
11
- - 2.5.1
12
11
 
13
12
  sudo: false
14
13
 
@@ -1,3 +1,7 @@
1
+ ## 0.11.23 - December 5, 2018
2
+
3
+ - Add support for validating Canadian branch codes if a modulus checker is configured
4
+
1
5
  ## 0.11.22 - October 18, 2018
2
6
 
3
7
  - Skipped 0.11.21
data/Gemfile CHANGED
@@ -3,3 +3,9 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ group :development do
8
+ gem "ruboconfig",
9
+ git: "https://github.com/gocardless/ruboconfig.git",
10
+ tag: "v1.2.0"
11
+ end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path("lib/ibandit/version", __dir__)
3
+ require File.expand_path("../lib/ibandit/version", __FILE__)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
- gem.add_development_dependency "gc_ruboconfig", "~> 2.3.11"
7
6
  gem.add_development_dependency "nokogiri", "~> 1.6"
8
7
  gem.add_development_dependency "pry", "~> 0.10"
9
8
  gem.add_development_dependency "pry-nav", "~> 0.2"
10
9
  gem.add_development_dependency "rspec", "~> 3.3"
11
10
  gem.add_development_dependency "rspec-its", "~> 1.2"
11
+ gem.add_development_dependency "rubocop", "~> 0.52.0"
12
12
  gem.add_development_dependency "sax-machine", "~> 1.3"
13
13
 
14
14
  gem.add_runtime_dependency "i18n"
@@ -14,8 +14,8 @@ require "ibandit/pseudo_iban_splitter"
14
14
  require "ibandit/local_details_cleaner"
15
15
  require "ibandit/check_digit"
16
16
 
17
- I18n.load_path += Dir[File.expand_path("../config/locales/*.{rb,yml}",
18
- __dir__)]
17
+ I18n.load_path += Dir[File.expand_path("../../config/locales/*.{rb,yml}",
18
+ __FILE__)]
19
19
 
20
20
  module Ibandit
21
21
  class << self
@@ -28,7 +28,7 @@ module Ibandit
28
28
 
29
29
  def structures
30
30
  @structures ||= YAML.load_file(
31
- File.expand_path("../data/structures.yml", __dir__),
31
+ File.expand_path("../../data/structures.yml", __FILE__),
32
32
  )
33
33
  end
34
34
 
@@ -7,7 +7,7 @@ module Ibandit
7
7
  module GermanDetailsConverter
8
8
  def self.rules
9
9
  @rules ||= YAML.load_file(
10
- File.expand_path("../../data/german_iban_rules.yml", __dir__),
10
+ File.expand_path("../../../data/german_iban_rules.yml", __FILE__),
11
11
  )
12
12
  end
13
13
 
@@ -41,8 +41,8 @@ module Ibandit
41
41
  end
42
42
 
43
43
  module PseudoAccountNumberBehaviour
44
- def self.included(object)
45
- object.extend(ClassMethods)
44
+ def self.included(o)
45
+ o.extend(ClassMethods)
46
46
  end
47
47
 
48
48
  module ClassMethods
@@ -283,6 +283,7 @@ module Ibandit
283
283
  when "SE" then valid_swedish_details?
284
284
  when "AU" then valid_australian_details?
285
285
  when "NZ" then valid_nz_details?
286
+ when "CA" then valid_ca_details?
286
287
  else true
287
288
  end
288
289
  end
@@ -362,6 +363,13 @@ module Ibandit
362
363
  valid_modulus_check_branch_code?
363
364
  end
364
365
 
366
+ def valid_ca_details?
367
+ return true unless country_code == "CA"
368
+ return true unless Ibandit.modulus_checker
369
+
370
+ valid_modulus_check_branch_code?
371
+ end
372
+
365
373
  def valid_australian_details?
366
374
  return true unless country_code == "AU"
367
375
 
@@ -11,7 +11,7 @@ module Ibandit
11
11
  end
12
12
 
13
13
  def self.bank_info_table
14
- @bank_info_table ||=
14
+ @swedish_bank_lookup ||=
15
15
  begin
16
16
  relative_path = "../../../../data/raw/swedish_bank_lookup.yml"
17
17
  raw_info = YAML.load_file(File.expand_path(relative_path, __FILE__))
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = "0.11.22".freeze
2
+ VERSION = "0.11.23".freeze
3
3
  end
@@ -4,15 +4,15 @@ describe Ibandit::GermanDetailsConverter do
4
4
  shared_examples "json based fixture" do |json_fixture_file|
5
5
  json_fixture(json_fixture_file).each do |convertor|
6
6
  context "Rule #{convertor['convertor']}" do
7
- subject { test_subject }
8
-
9
7
  let(:klass) do
10
8
  described_class.const_get("Rule#{convertor['convertor']}")
11
9
  end
12
10
 
11
+ subject { test_subject }
12
+
13
13
  before do
14
- allow_any_instance_of(klass).
15
- to receive(:converted_details).and_call_original
14
+ expect_any_instance_of(klass).to receive(:converted_details).
15
+ and_call_original
16
16
  end
17
17
 
18
18
  convertor.fetch("valid", []).each do |tuple|
@@ -30,9 +30,8 @@ describe Ibandit::GermanDetailsConverter do
30
30
  let(:converted_account_number) do
31
31
  tuple["converted_account_number"] || account_number
32
32
  end
33
-
34
33
  it do
35
- expect(subject).to eq(
34
+ is_expected.to eq(
36
35
  bank_code: converted_bank_code,
37
36
  account_number: converted_account_number,
38
37
  )
@@ -45,7 +44,6 @@ describe Ibandit::GermanDetailsConverter do
45
44
  "#{tuple['account_number']}" do
46
45
  let(:bank_code) { tuple["bank_code"] || "00000000" }
47
46
  let(:account_number) { tuple["account_number"] }
48
-
49
47
  it "raises UnsupportedAccountDetails" do
50
48
  expect { subject }.
51
49
  to raise_error(Ibandit::UnsupportedAccountDetails)
@@ -90,7 +88,6 @@ describe Ibandit::GermanDetailsConverter do
90
88
  valid_account_numbers.each do |number|
91
89
  context number.to_s do
92
90
  let(:account_number) { number }
93
-
94
91
  it { is_expected.to be_valid }
95
92
  end
96
93
  end
@@ -98,7 +95,6 @@ describe Ibandit::GermanDetailsConverter do
98
95
  invalid_account_numbers.each do |number|
99
96
  context number.to_s do
100
97
  let(:account_number) { number }
101
-
102
98
  it { is_expected.to_not be_valid }
103
99
  end
104
100
  end
@@ -19,18 +19,15 @@ describe Ibandit::IBANAssembler do
19
19
 
20
20
  describe ".assemble" do
21
21
  subject(:assemble) { described_class.assemble(args) }
22
-
23
22
  let(:args) { { country_code: "ES" } }
24
23
 
25
24
  context "without a country_code" do
26
25
  let(:args) { { bank_code: 1 } }
27
-
28
26
  it { is_expected.to be_nil }
29
27
  end
30
28
 
31
29
  context "with an unsupported country_code" do
32
30
  let(:args) { { country_code: "FU" } }
33
-
34
31
  it { is_expected.to be_nil }
35
32
  end
36
33
 
@@ -49,13 +46,11 @@ describe Ibandit::IBANAssembler do
49
46
 
50
47
  context "without an account_number" do
51
48
  before { args.delete(:account_number) }
52
-
53
49
  it { is_expected.to be_nil }
54
50
  end
55
51
 
56
52
  context "without an bank_code" do
57
53
  before { args.delete(:bank_code) }
58
-
59
54
  it { is_expected.to be_nil }
60
55
  end
61
56
  end
@@ -69,7 +64,6 @@ describe Ibandit::IBANAssembler do
69
64
 
70
65
  context "without an account_number" do
71
66
  before { args.delete(:account_number) }
72
-
73
67
  it { is_expected.to be_nil }
74
68
  end
75
69
  end
@@ -90,13 +84,11 @@ describe Ibandit::IBANAssembler do
90
84
 
91
85
  context "without an account_number" do
92
86
  before { args.delete(:account_number) }
93
-
94
87
  it { is_expected.to be_nil }
95
88
  end
96
89
 
97
90
  context "without a bank_code" do
98
91
  before { args.delete(:bank_code) }
99
-
100
92
  it { is_expected.to be_nil }
101
93
  end
102
94
  end
@@ -117,19 +109,16 @@ describe Ibandit::IBANAssembler do
117
109
 
118
110
  context "without an branch_code" do
119
111
  before { args.delete(:branch_code) }
120
-
121
112
  it { is_expected.to eq("CY040020000001200527600") }
122
113
  end
123
114
 
124
115
  context "without an account_number" do
125
116
  before { args.delete(:account_number) }
126
-
127
117
  it { is_expected.to be_nil }
128
118
  end
129
119
 
130
120
  context "without an bank_code" do
131
121
  before { args.delete(:bank_code) }
132
-
133
122
  it { is_expected.to be_nil }
134
123
  end
135
124
  end
@@ -149,13 +138,11 @@ describe Ibandit::IBANAssembler do
149
138
 
150
139
  context "without a bank_code" do
151
140
  before { args.delete(:bank_code) }
152
-
153
141
  it { is_expected.to be_nil }
154
142
  end
155
143
 
156
144
  context "without an account_number" do
157
145
  before { args.delete(:account_number) }
158
-
159
146
  it { is_expected.to be_nil }
160
147
  end
161
148
  end
@@ -173,13 +160,11 @@ describe Ibandit::IBANAssembler do
173
160
 
174
161
  context "without a bank_code" do
175
162
  before { args.delete(:bank_code) }
176
-
177
163
  it { is_expected.to be_nil }
178
164
  end
179
165
 
180
166
  context "without an account_number" do
181
167
  before { args.delete(:account_number) }
182
-
183
168
  it { is_expected.to be_nil }
184
169
  end
185
170
  end
@@ -197,13 +182,11 @@ describe Ibandit::IBANAssembler do
197
182
 
198
183
  context "without a bank_code" do
199
184
  before { args.delete(:bank_code) }
200
-
201
185
  it { is_expected.to be_nil }
202
186
  end
203
187
 
204
188
  context "without an account_number" do
205
189
  before { args.delete(:account_number) }
206
-
207
190
  it { is_expected.to be_nil }
208
191
  end
209
192
  end
@@ -223,7 +206,6 @@ describe Ibandit::IBANAssembler do
223
206
 
224
207
  context "without an account_number" do
225
208
  before { args.delete(:account_number) }
226
-
227
209
  it { is_expected.to be_nil }
228
210
  end
229
211
  end
@@ -244,9 +226,7 @@ describe Ibandit::IBANAssembler do
244
226
 
245
227
  context "without a bank_code or branch code" do
246
228
  before { args.delete(:bank_code) }
247
-
248
229
  before { args.delete(:branch_code) }
249
-
250
230
  before { args[:account_number] = "23100001180000012345" }
251
231
 
252
232
  it { is_expected.to be_nil }
@@ -254,7 +234,6 @@ describe Ibandit::IBANAssembler do
254
234
 
255
235
  context "without an account_number" do
256
236
  before { args.delete(:account_number) }
257
-
258
237
  it { is_expected.to be_nil }
259
238
  end
260
239
  end
@@ -270,13 +249,11 @@ describe Ibandit::IBANAssembler do
270
249
 
271
250
  context "without an account_number" do
272
251
  before { args.delete(:account_number) }
273
-
274
252
  it { is_expected.to be_nil }
275
253
  end
276
254
 
277
255
  context "without a bank_code" do
278
256
  before { args.delete(:bank_code) }
279
-
280
257
  it { is_expected.to be_nil }
281
258
  end
282
259
  end
@@ -297,25 +274,21 @@ describe Ibandit::IBANAssembler do
297
274
 
298
275
  context "without the rib key in the account number" do
299
276
  before { args[:account_number] = "0500013M026" }
300
-
301
277
  specify { expect(Ibandit::IBAN.new(assemble)).to_not be_valid }
302
278
  end
303
279
 
304
280
  context "without a bank_code" do
305
281
  before { args.delete(:bank_code) }
306
-
307
282
  it { is_expected.to be_nil }
308
283
  end
309
284
 
310
285
  context "without a branch_code" do
311
286
  before { args.delete(:branch_code) }
312
-
313
287
  it { is_expected.to be_nil }
314
288
  end
315
289
 
316
290
  context "without an account_number" do
317
291
  before { args.delete(:account_number) }
318
-
319
292
  it { is_expected.to be_nil }
320
293
  end
321
294
  end
@@ -336,31 +309,26 @@ describe Ibandit::IBANAssembler do
336
309
 
337
310
  context "with the bank_code supplied manually" do
338
311
  before { args.merge!(bank_code: "BARC") }
339
-
340
312
  it { is_expected.to eq("GB07BARC20000000579135") }
341
313
  end
342
314
 
343
315
  context "without a branch_code" do
344
316
  before { args.delete(:branch_code) }
345
-
346
317
  it { is_expected.to be_nil }
347
318
  end
348
319
 
349
320
  context "without an account_number" do
350
321
  before { args.delete(:account_number) }
351
-
352
322
  it { is_expected.to be_nil }
353
323
  end
354
324
 
355
325
  context "without a bank_code" do
356
326
  before { args.delete(:bank_code) }
357
-
358
327
  it { is_expected.to be_nil }
359
328
  end
360
329
 
361
330
  context "with a non-numeric branch code" do
362
331
  before { args[:branch_code] = "abc123" }
363
-
364
332
  it { is_expected.to be_nil }
365
333
  end
366
334
  end
@@ -381,19 +349,16 @@ describe Ibandit::IBANAssembler do
381
349
 
382
350
  context "without an account_number" do
383
351
  before { args.delete(:account_number) }
384
-
385
352
  it { is_expected.to be_nil }
386
353
  end
387
354
 
388
355
  context "without a bank_code" do
389
356
  before { args.delete(:bank_code) }
390
-
391
357
  it { is_expected.to be_nil }
392
358
  end
393
359
 
394
360
  context "without a branch_code" do
395
361
  before { args.delete(:branch_code) }
396
-
397
362
  it { is_expected.to be_nil }
398
363
  end
399
364
  end
@@ -411,13 +376,11 @@ describe Ibandit::IBANAssembler do
411
376
 
412
377
  context "without a bank_code" do
413
378
  before { args.delete(:bank_code) }
414
-
415
379
  it { is_expected.to be_nil }
416
380
  end
417
381
 
418
382
  context "without an account_number" do
419
383
  before { args.delete(:account_number) }
420
-
421
384
  it { is_expected.to be_nil }
422
385
  end
423
386
  end
@@ -438,9 +401,7 @@ describe Ibandit::IBANAssembler do
438
401
 
439
402
  context "without a bank_code or branch_code" do
440
403
  before { args.delete(:bank_code) }
441
-
442
404
  before { args.delete(:branch_code) }
443
-
444
405
  before { args[:account_number] = "11773016-11111018-00000000" }
445
406
 
446
407
  it { is_expected.to be_nil }
@@ -448,7 +409,6 @@ describe Ibandit::IBANAssembler do
448
409
 
449
410
  context "without a bank_code" do
450
411
  before { args.delete(:bank_code) }
451
-
452
412
  before { args[:account_number] = "11773016-11111018-00000000" }
453
413
 
454
414
  it { is_expected.to be_nil }
@@ -456,7 +416,6 @@ describe Ibandit::IBANAssembler do
456
416
 
457
417
  context "without a branch_code" do
458
418
  before { args.delete(:branch_code) }
459
-
460
419
  before { args[:account_number] = "11773016-11111018-00000000" }
461
420
 
462
421
  it { is_expected.to be_nil }
@@ -464,7 +423,6 @@ describe Ibandit::IBANAssembler do
464
423
 
465
424
  context "without an account_number" do
466
425
  before { args.delete(:account_number) }
467
-
468
426
  it { is_expected.to be_nil }
469
427
  end
470
428
  end
@@ -483,19 +441,16 @@ describe Ibandit::IBANAssembler do
483
441
 
484
442
  context "without a branch_code" do
485
443
  before { args.delete(:branch_code) }
486
-
487
444
  it { is_expected.to be_nil }
488
445
  end
489
446
 
490
447
  context "without an account_number" do
491
448
  before { args.delete(:account_number) }
492
-
493
449
  it { is_expected.to be_nil }
494
450
  end
495
451
 
496
452
  context "without a bank_code" do
497
453
  before { args.delete(:bank_code) }
498
-
499
454
  it { is_expected.to be_nil }
500
455
  end
501
456
  end
@@ -515,13 +470,11 @@ describe Ibandit::IBANAssembler do
515
470
 
516
471
  context "without an account_number" do
517
472
  before { args.delete(:account_number) }
518
-
519
473
  it { is_expected.to be_nil }
520
474
  end
521
475
 
522
476
  context "without a bank_code" do
523
477
  before { args.delete(:bank_code) }
524
-
525
478
  it { is_expected.to be_nil }
526
479
  end
527
480
  end
@@ -542,37 +495,31 @@ describe Ibandit::IBANAssembler do
542
495
 
543
496
  context "with an explicitly passed check digit" do
544
497
  before { args[:check_digit] = "Y" }
545
-
546
498
  it { is_expected.to eq("IT64Y0542811101000000123456") }
547
499
  end
548
500
 
549
501
  context "with a bad character in an odd position" do
550
502
  before { args[:account_number] = "000000123h00" }
551
-
552
503
  it { is_expected.to be_nil }
553
504
  end
554
505
 
555
506
  context "with a bad character in an even position" do
556
507
  before { args[:account_number] = "0000001230h0" }
557
-
558
508
  it { is_expected.to be_nil }
559
509
  end
560
510
 
561
511
  context "without a bank_code" do
562
512
  before { args.delete(:bank_code) }
563
-
564
513
  it { is_expected.to be_nil }
565
514
  end
566
515
 
567
516
  context "without a branch_code" do
568
517
  before { args.delete(:branch_code) }
569
-
570
518
  it { is_expected.to be_nil }
571
519
  end
572
520
 
573
521
  context "without an account_number" do
574
522
  before { args.delete(:account_number) }
575
-
576
523
  it { is_expected.to be_nil }
577
524
  end
578
525
  end
@@ -592,13 +539,11 @@ describe Ibandit::IBANAssembler do
592
539
 
593
540
  context "without an account_number" do
594
541
  before { args.delete(:account_number) }
595
-
596
542
  it { is_expected.to be_nil }
597
543
  end
598
544
 
599
545
  context "without a bank_code" do
600
546
  before { args.delete(:bank_code) }
601
-
602
547
  it { is_expected.to be_nil }
603
548
  end
604
549
  end
@@ -618,13 +563,11 @@ describe Ibandit::IBANAssembler do
618
563
 
619
564
  context "without an account_number" do
620
565
  before { args.delete(:account_number) }
621
-
622
566
  it { is_expected.to be_nil }
623
567
  end
624
568
 
625
569
  context "without a bank_code" do
626
570
  before { args.delete(:bank_code) }
627
-
628
571
  it { is_expected.to be_nil }
629
572
  end
630
573
  end
@@ -644,13 +587,11 @@ describe Ibandit::IBANAssembler do
644
587
 
645
588
  context "without an account_number" do
646
589
  before { args.delete(:account_number) }
647
-
648
590
  it { is_expected.to be_nil }
649
591
  end
650
592
 
651
593
  context "without a bank_code" do
652
594
  before { args.delete(:bank_code) }
653
-
654
595
  it { is_expected.to be_nil }
655
596
  end
656
597
  end
@@ -671,25 +612,21 @@ describe Ibandit::IBANAssembler do
671
612
 
672
613
  context "without the rib key in the account number" do
673
614
  before { args[:account_number] = "0500013M026" }
674
-
675
615
  specify { expect(Ibandit::IBAN.new(assemble)).to_not be_valid }
676
616
  end
677
617
 
678
618
  context "without a bank_code" do
679
619
  before { args.delete(:bank_code) }
680
-
681
620
  it { is_expected.to be_nil }
682
621
  end
683
622
 
684
623
  context "without a branch_code" do
685
624
  before { args.delete(:branch_code) }
686
-
687
625
  it { is_expected.to be_nil }
688
626
  end
689
627
 
690
628
  context "without an account_number" do
691
629
  before { args.delete(:account_number) }
692
-
693
630
  it { is_expected.to be_nil }
694
631
  end
695
632
  end
@@ -713,25 +650,21 @@ describe Ibandit::IBANAssembler do
713
650
 
714
651
  context "without a branch_code" do
715
652
  before { args.delete(:branch_code) }
716
-
717
653
  it { is_expected.to be_nil }
718
654
  end
719
655
 
720
656
  context "without an account_number" do
721
657
  before { args.delete(:account_number) }
722
-
723
658
  it { is_expected.to be_nil }
724
659
  end
725
660
 
726
661
  context "without a bank_code" do
727
662
  before { args.delete(:bank_code) }
728
-
729
663
  it { is_expected.to be_nil }
730
664
  end
731
665
 
732
666
  context "with a non-numeric branch code" do
733
667
  before { args[:branch_code] = "abc123" }
734
-
735
668
  it { is_expected.to be_nil }
736
669
  end
737
670
  end
@@ -751,13 +684,11 @@ describe Ibandit::IBANAssembler do
751
684
 
752
685
  context "without an account_number" do
753
686
  before { args.delete(:account_number) }
754
-
755
687
  it { is_expected.to be_nil }
756
688
  end
757
689
 
758
690
  context "without an bank_code" do
759
691
  before { args.delete(:bank_code) }
760
-
761
692
  it { is_expected.to be_nil }
762
693
  end
763
694
  end
@@ -777,7 +708,6 @@ describe Ibandit::IBANAssembler do
777
708
 
778
709
  context "without a bank_code" do
779
710
  before { args.delete(:bank_code) }
780
-
781
711
  before { args[:account_number] = "86011117947" }
782
712
 
783
713
  it { is_expected.to be_nil }
@@ -785,7 +715,6 @@ describe Ibandit::IBANAssembler do
785
715
 
786
716
  context "without an account_number" do
787
717
  before { args.delete(:account_number) }
788
-
789
718
  it { is_expected.to be_nil }
790
719
  end
791
720
  end
@@ -805,7 +734,6 @@ describe Ibandit::IBANAssembler do
805
734
 
806
735
  context "without a bank_code" do
807
736
  before { args.delete(:bank_code) }
808
-
809
737
  before { args[:account_number] = "60102010260000042270201111" }
810
738
 
811
739
  it { is_expected.to be_nil }
@@ -813,7 +741,6 @@ describe Ibandit::IBANAssembler do
813
741
 
814
742
  context "without an account_number" do
815
743
  before { args.delete(:account_number) }
816
-
817
744
  it { is_expected.to be_nil }
818
745
  end
819
746
  end
@@ -834,19 +761,16 @@ describe Ibandit::IBANAssembler do
834
761
 
835
762
  context "without a bank_code" do
836
763
  before { args.delete(:bank_code) }
837
-
838
764
  it { is_expected.to be_nil }
839
765
  end
840
766
 
841
767
  context "without a branch_code" do
842
768
  before { args.delete(:branch_code) }
843
-
844
769
  it { is_expected.to be_nil }
845
770
  end
846
771
 
847
772
  context "without an account_number" do
848
773
  before { args.delete(:account_number) }
849
-
850
774
  it { is_expected.to be_nil }
851
775
  end
852
776
  end
@@ -866,13 +790,11 @@ describe Ibandit::IBANAssembler do
866
790
 
867
791
  context "without an account_number" do
868
792
  before { args.delete(:account_number) }
869
-
870
793
  it { is_expected.to be_nil }
871
794
  end
872
795
 
873
796
  context "without a bank_code" do
874
797
  before { args.delete(:bank_code) }
875
-
876
798
  it { is_expected.to be_nil }
877
799
  end
878
800
  end
@@ -892,13 +814,11 @@ describe Ibandit::IBANAssembler do
892
814
 
893
815
  context "without a bank_code" do
894
816
  before { args.delete(:bank_code) }
895
-
896
817
  it { is_expected.to be_nil }
897
818
  end
898
819
 
899
820
  context "without an account_number" do
900
821
  before { args.delete(:account_number) }
901
-
902
822
  it { is_expected.to be_nil }
903
823
  end
904
824
  end
@@ -918,13 +838,11 @@ describe Ibandit::IBANAssembler do
918
838
 
919
839
  context "without a bank_code" do
920
840
  before { args.delete(:bank_code) }
921
-
922
841
  it { is_expected.to be_nil }
923
842
  end
924
843
 
925
844
  context "without an account_number" do
926
845
  before { args.delete(:account_number) }
927
-
928
846
  it { is_expected.to be_nil }
929
847
  end
930
848
  end
@@ -944,13 +862,11 @@ describe Ibandit::IBANAssembler do
944
862
 
945
863
  context "without a bank_code" do
946
864
  before { args.delete(:bank_code) }
947
-
948
865
  it { is_expected.to be_nil }
949
866
  end
950
867
 
951
868
  context "without an account_number" do
952
869
  before { args.delete(:account_number) }
953
-
954
870
  it { is_expected.to be_nil }
955
871
  end
956
872
  end
@@ -971,19 +887,16 @@ describe Ibandit::IBANAssembler do
971
887
 
972
888
  context "without a bank_code" do
973
889
  before { args.delete(:bank_code) }
974
-
975
890
  it { is_expected.to be_nil }
976
891
  end
977
892
 
978
893
  context "without a branch_code" do
979
894
  before { args.delete(:branch_code) }
980
-
981
895
  it { is_expected.to be_nil }
982
896
  end
983
897
 
984
898
  context "without an account_number" do
985
899
  before { args.delete(:account_number) }
986
-
987
900
  it { is_expected.to be_nil }
988
901
  end
989
902
  end