diff options
Diffstat (limited to 'railties/test/generators/generators_test_helper.rb')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 77ec2f1c0c..6cc91f166b 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -7,7 +7,7 @@ module Rails class << self remove_possible_method :root def root - @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures')) + @root ||= Pathname.new(File.expand_path('../../fixtures', __FILE__)) end end end @@ -41,4 +41,12 @@ module GeneratorsTestHelper FileUtils.mkdir_p(destination) FileUtils.cp routes, destination end + + def quietly + silence_stream(STDOUT) do + silence_stream(STDERR) do + yield + end + end + end end |