aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/test_case.rb20
1 files changed, 1 insertions, 19 deletions
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb
index 3376b422cb..cab8708be3 100644
--- a/railties/lib/rails/generators/test_case.rb
+++ b/railties/lib/rails/generators/test_case.rb
@@ -1,6 +1,7 @@
require 'active_support/core_ext/class/attribute'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/hash/reverse_merge'
+require 'active_support/core_ext/kernel/reporting'
require 'rails/generators'
require 'fileutils'
@@ -65,25 +66,6 @@ module Rails
self.destination_root = path
end
- # Captures the given stream and returns it:
- #
- # stream = capture(:stdout){ puts "Cool" }
- # stream # => "Cool\n"
- #
- def capture(stream)
- begin
- stream = stream.to_s
- eval "$#{stream} = StringIO.new"
- yield
- result = eval("$#{stream}").string
- ensure
- eval("$#{stream} = #{stream.upcase}")
- end
-
- result
- end
- alias :silence :capture
-
# Asserts a given file exists. You need to supply an absolute path or a path relative
# to the configured destination:
#