aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/testing/setup_and_teardown.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/testing/setup_and_teardown.rb')
-rw-r--r--railties/lib/rails/generators/testing/setup_and_teardown.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/testing/setup_and_teardown.rb b/railties/lib/rails/generators/testing/setup_and_teardown.rb
new file mode 100644
index 0000000000..73102a283f
--- /dev/null
+++ b/railties/lib/rails/generators/testing/setup_and_teardown.rb
@@ -0,0 +1,18 @@
+module Rails
+ module Generators
+ module Testing
+ module SetupAndTeardown
+ def setup # :nodoc:
+ destination_root_is_set?
+ ensure_current_path
+ super
+ end
+
+ def teardown # :nodoc:
+ ensure_current_path
+ super
+ end
+ end
+ end
+ end
+end