aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/generators_test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/generators_test_helper.rb')
-rw-r--r--railties/test/generators/generators_test_helper.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb
index e7990de754..b19a5a7144 100644
--- a/railties/test/generators/generators_test_helper.rb
+++ b/railties/test/generators/generators_test_helper.rb
@@ -1,5 +1,7 @@
require 'abstract_unit'
require 'active_support/core_ext/module/remove_method'
+require 'active_support/testing/stream'
+require 'active_support/testing/method_call_assertions'
require 'rails/generators'
require 'rails/generators/test_case'
@@ -7,7 +9,7 @@ module Rails
class << self
remove_possible_method :root
def root
- @root ||= File.expand_path('../../fixtures', __FILE__)
+ @root ||= Pathname.new(File.expand_path('../../fixtures', __FILE__))
end
end
end
@@ -23,6 +25,9 @@ require 'action_dispatch'
require 'action_view'
module GeneratorsTestHelper
+ include ActiveSupport::Testing::Stream
+ include ActiveSupport::Testing::MethodCallAssertions
+
def self.included(base)
base.class_eval do
destination File.join(Rails.root, "tmp")
@@ -42,11 +47,4 @@ module GeneratorsTestHelper
FileUtils.cp routes, destination
end
- def quietly
- silence_stream(STDOUT) do
- silence_stream(STDERR) do
- yield
- end
- end
- end
end