rails/actionpack/test/testing_sandbox.rb
2006-10-12 21:13:05 +00:00

12 lines
205 B
Ruby

module TestingSandbox
# Temporarily replaces KCODE for the block
def with_kcode(kcode)
old_kcode, $KCODE = $KCODE, kcode
begin
yield
ensure
$KCODE = old_kcode
end
end
end