assert_difference (Test::Unit::Assertions)

    # File lib/active_support/testing/core_ext/test/unit/assertions.rb, line 38
          def assert_difference(expressions, difference = 1, message = nil, &block)
            expression_evaluations = Array(expressions).map do |expression|
              [expression, lambda do
                eval(expression, block.__send__(:binding))
              end]
            end

            original_values = expression_evaluations.inject([]) { |memo, expression| memo << expression[1].call }
            yield
            expression_evaluations.each_with_index do |expression, i|
              full_message = ""
              full_message << "#{message}.\n" if message
              full_message << "<#{expression[0]}> was the expression that failed"
              assert_equal original_values[i] + difference, expression[1].call, full_message
            end
          end