Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 79a06225ef
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (16 sloc) 0.499 kb
module ActiveSupport
module Testing
module GarbageCollection
def self.included(base)
base.teardown :scrub_leftover_instance_variables
end
private
RESERVED_INSTANCE_VARIABLES = %w(@test_passed @passed @method_name @__name__ @_result).map(&:to_sym)
def scrub_leftover_instance_variables
(instance_variables.map(&:to_sym) - RESERVED_INSTANCE_VARIABLES).each do |var|
remove_instance_variable(var)
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.