|
1 | 1 | require "spec_helper" |
2 | 2 |
|
3 | 3 | describe OFX::Parser do |
4 | | - def ofx_2_example(version) |
| 4 | + def ofx_example_to(version) |
5 | 5 | <<~OFX_CONTENT |
6 | 6 | <?xml version="1.0" encoding="US-ASCII"?> |
7 | 7 |
|
@@ -61,35 +61,35 @@ def ofx_2_example(version) |
61 | 61 | it "uses 102 parser to parse version 100 ofx files" do |
62 | 62 | expect(OFX::Parser::OFX102).to receive(:new).and_return('ofx-102-parser') |
63 | 63 |
|
64 | | - ofx = OFX::Parser::Base.new(ofx_2_example('100')) |
| 64 | + ofx = OFX::Parser::Base.new(ofx_example_to('100')) |
65 | 65 | expect(ofx.parser).to eql 'ofx-102-parser' |
66 | 66 | end |
67 | 67 |
|
68 | 68 | it "uses 102 parser to parse version 103 ofx files" do |
69 | 69 | expect(OFX::Parser::OFX102).to receive(:new).and_return('ofx-102-parser') |
70 | 70 |
|
71 | | - ofx = OFX::Parser::Base.new(ofx_2_example('103')) |
| 71 | + ofx = OFX::Parser::Base.new(ofx_example_to('103')) |
72 | 72 | expect(ofx.parser).to eql 'ofx-102-parser' |
73 | 73 | end |
74 | 74 |
|
75 | 75 | it "uses 211 parser to parse version 200 ofx files" do |
76 | 76 | expect(OFX::Parser::OFX211).to receive(:new).and_return('ofx-211-parser') |
77 | 77 |
|
78 | | - ofx = OFX::Parser::Base.new(ofx_2_example('200')) |
| 78 | + ofx = OFX::Parser::Base.new(ofx_example_to('200')) |
79 | 79 | expect(ofx.parser).to eql 'ofx-211-parser' |
80 | 80 | end |
81 | 81 |
|
82 | 82 | it "uses 211 parser to parse version 202 ofx files" do |
83 | 83 | expect(OFX::Parser::OFX211).to receive(:new).and_return('ofx-211-parser') |
84 | 84 |
|
85 | | - ofx = OFX::Parser::Base.new(ofx_2_example('202')) |
| 85 | + ofx = OFX::Parser::Base.new(ofx_example_to('202')) |
86 | 86 | expect(ofx.parser).to eql 'ofx-211-parser' |
87 | 87 | end |
88 | 88 |
|
89 | 89 | it "uses 211 parser to parse version 220 ofx files" do |
90 | 90 | expect(OFX::Parser::OFX211).to receive(:new).and_return('ofx-211-parser') |
91 | 91 |
|
92 | | - ofx = OFX::Parser::Base.new(ofx_2_example('220')) |
| 92 | + ofx = OFX::Parser::Base.new(ofx_example_to('220')) |
93 | 93 | expect(ofx.parser).to eql 'ofx-211-parser' |
94 | 94 | end |
95 | 95 |
|
|
0 commit comments