Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clean up example a bit

  • Loading branch information...
commit fa6e0242190698c2f721118037e4641fa2dfcc16 1 parent 5cadb79
Jeffrey ODell jodell authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 examples/ach/parse_example.rb
10 examples/ach/parse_example.rb
View
@@ -8,15 +8,9 @@
end
it 'should produce the same number of entries as the original ACH file' do
- ACH::ACHFile.new(@data).batches.reduce([]) do |entries, batch|
- batch.entries.each { |e| entries << e }
- entries
- end.size.should == 3
+ entries = ACH::ACHFile.new(@data).batches.reduce([]) { |entries, batch| entries << batch.entries }
- ACH::ACHFile.new(ACH::ACHFile.new(@data).to_s).batches.reduce([]) do |entries, batch|
- batch.entries.each { |e| entries << e }
- entries
- end.size.should == 3
+ entries.flatten.size.should == 3
end
it "should parse return/notification of change file" do
Please sign in to comment.
Something went wrong with that request. Please try again.