test/test_helper.rb in bbqueue-0.0.1 vs test/test_helper.rb in bbqueue-0.0.2

- old
+ new

@@ -1,9 +1,10 @@ require "bbqueue" require "minitest" require "minitest/autorun" +require "tempfile" require File.expand_path("../bbqueue/stalking", __FILE__) require File.expand_path("../bbqueue/test_job", __FILE__) require File.expand_path("../bbqueue/test_logger", __FILE__) @@ -15,12 +16,13 @@ end def assert_difference(expression, difference = 1, message = nil, &block) expressions = Array(expression) - exps = expressions.map { |e| + exps = expressions.map do |e| e.respond_to?(:call) ? e : lambda { eval(e, block.binding) } - } + end + before = exps.map { |e| e.call } yield expressions.zip(exps).each_with_index do |(code, e), i|