File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def rollback!
24
24
tran . debit_items . each { |di | credit ( di . account , di . amount ) }
25
25
tran . credit_items . each { |ci | debit ( ci . account , ci . amount ) }
26
26
reference ( tran )
27
+ kind ( tran . kind )
27
28
description ( "Rollback of #{ tran . description } " )
28
29
end
29
30
end
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ module Deb
84
84
credit @revenue , 5
85
85
credit @liability , 7
86
86
description "foobar"
87
+ kind "baz"
87
88
end
88
89
end
89
90
@@ -144,6 +145,10 @@ module Deb
144
145
@rollback . description . should == "Rollback of foobar"
145
146
end
146
147
148
+ it "should preserve transaction kind" do
149
+ @rollback . kind . should == @transaction . kind
150
+ end
151
+
147
152
it "should set debit accounts" do
148
153
@rollback . debit_items . collect ( &:account ) . should == [ @revenue , @liability ]
149
154
end
You can’t perform that action at this time.
0 commit comments