aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_case.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-24 17:21:17 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-24 17:21:17 +0000
commit9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch)
tree74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /railties/lib/rails/generators/test_case.rb
parentaff821508a16245ebc03510ba29c70379718dfb7 (diff)
parent5214e73850916de3c9127d35a4ecee0424d364a3 (diff)
downloadrails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz
rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2
rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'railties/lib/rails/generators/test_case.rb')
-rw-r--r--railties/lib/rails/generators/test_case.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb
index 3376b422cb..ee85b70bb5 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:
#
@@ -132,7 +114,7 @@ module Rails
end
alias :assert_no_directory :assert_no_file
- # Asserts a given file does not exist. You need to supply an absolute path or a
+ # Asserts a given migration exists. You need to supply an absolute path or a
# path relative to the configured destination:
#
# assert_migration "db/migrate/create_products.rb"