diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-22 17:17:14 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-22 17:17:14 -0700 |
commit | da9e53ec3b92fd583346896dd15c5b2533c8af6a (patch) | |
tree | 9ca5eea8c06a6f58d932f8920f98fde9824bef5a /actionpack/test/lib/testing_sandbox.rb | |
parent | 8a03a999ef2ed47c7f2ead1a9dd639120c569e03 (diff) | |
download | rails-da9e53ec3b92fd583346896dd15c5b2533c8af6a.tar.gz rails-da9e53ec3b92fd583346896dd15c5b2533c8af6a.tar.bz2 rails-da9e53ec3b92fd583346896dd15c5b2533c8af6a.zip |
Move testing_sandbox to test/lib
Diffstat (limited to 'actionpack/test/lib/testing_sandbox.rb')
-rw-r--r-- | actionpack/test/lib/testing_sandbox.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/lib/testing_sandbox.rb b/actionpack/test/lib/testing_sandbox.rb new file mode 100644 index 0000000000..c36585104f --- /dev/null +++ b/actionpack/test/lib/testing_sandbox.rb @@ -0,0 +1,15 @@ +module TestingSandbox + # Temporarily replaces KCODE for the block + def with_kcode(kcode) + if RUBY_VERSION < '1.9' + old_kcode, $KCODE = $KCODE, kcode + begin + yield + ensure + $KCODE = old_kcode + end + else + yield + end + end +end |