aboutsummaryrefslogtreecommitdiffstats
path: root/switchtower/test/utils.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-30 20:53:32 +0000
committerJamis Buck <jamis@37signals.com>2005-08-30 20:53:32 +0000
commit6b1864a048ffb9343d4658ec11c32494d7f038db (patch)
tree6c1ad3f9131d644afab6cc6188001cfb73775e33 /switchtower/test/utils.rb
parentbb7f60ca1cd191fd775fef261b4d2bc7af223604 (diff)
downloadrails-6b1864a048ffb9343d4658ec11c32494d7f038db.tar.gz
rails-6b1864a048ffb9343d4658ec11c32494d7f038db.tar.bz2
rails-6b1864a048ffb9343d4658ec11c32494d7f038db.zip
Move switchtower to the tools directory, to decouple it from rails
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'switchtower/test/utils.rb')
-rw-r--r--switchtower/test/utils.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/switchtower/test/utils.rb b/switchtower/test/utils.rb
deleted file mode 100644
index 4ddfbdbad1..0000000000
--- a/switchtower/test/utils.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class Module
- def const_during(constant, value)
- if const_defined?(constant)
- overridden = true
- saved = const_get(constant)
- remove_const(constant)
- end
-
- const_set(constant, value)
- yield
- ensure
- if overridden
- remove_const(constant)
- const_set(constant, saved)
- end
- end
-end
-
-class MockLogger
- def info(msg,pfx=nil) end
- def debug(msg,pfx=nil) end
-end
-
-class MockConfiguration < Hash
- def initialize(*args)
- super
- self[:release_path] = "/path/to/releases/version"
- end
-
- def logger
- @logger ||= MockLogger.new
- end
-
- def method_missing(sym, *args)
- if args.length == 0
- self[sym]
- else
- super
- end
- end
-end