Permalink
Browse files

clean up example a bit

  • Loading branch information...
1 parent 5cadb79 commit fa6e0242190698c2f721118037e4641fa2dfcc16 @jodell jodell committed Mar 29, 2013
Showing with 2 additions and 8 deletions.
  1. +2 −8 examples/ach/parse_example.rb
View
10 examples/ach/parse_example.rb
@@ -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

0 comments on commit fa6e024

Please sign in to comment.