Sha256: ca6fc83320aa68fde3ca352cb26a88cc4999a3013a8d29760369009cc7e37c57
Contents?: true
Size: 368 Bytes
Versions: 40
Compression:
Stored size: 368 Bytes
Contents
module DefinesConstants def self.included(base) base.before(:each) do @defined_constants = [] end base.after(:each) do @defined_constants.each do |constant| Object.__send__(:remove_const, constant) end end end def define_constant(name, value) Object.const_set(name, value) @defined_constants << name end end
Version data entries
40 entries across 40 versions & 1 rubygems