Merge pull request #1424 from Bovi-Li/test-assert

Fix assignment of block as actual value and not expected
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-07-31 20:50:53 -07:00
+2 -2
View File
@@ -101,7 +101,7 @@ end
def assert_equal(arg1, arg2 = nil, arg3 = nil)
if block_given?
exp, act, msg = yield, arg1, arg2
exp, act, msg = arg1, yield, arg2
else
exp, act, msg = arg1, arg2, arg3
end
@@ -113,7 +113,7 @@ end
def assert_not_equal(arg1, arg2 = nil, arg3 = nil)
if block_given?
exp, act, msg = yield, arg1, arg2
exp, act, msg = arg1, yield, arg2
else
exp, act, msg = arg1, arg2, arg3
end