aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-08-13 22:55:32 +0300
committerCristian Bica <cristian.bica@gmail.com>2014-08-13 22:55:32 +0300
commit06908e60be2bd3e2f247e26d3d1fa6bcb7f43943 (patch)
tree2f1752c774fad931e62669ee96d26b5b7da0bd61 /railties
parent95b79c1ff4d253d1554615baa5a02b0910d5a6dc (diff)
parent2750cc41484266c731c4bf0460d74b0de49e7450 (diff)
downloadrails-06908e60be2bd3e2f247e26d3d1fa6bcb7f43943.tar.gz
rails-06908e60be2bd3e2f247e26d3d1fa6bcb7f43943.tar.bz2
rails-06908e60be2bd3e2f247e26d3d1fa6bcb7f43943.zip
Merge branch 'master' into activejob
Diffstat (limited to 'railties')
-rw-r--r--railties/test/generators_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb
index b5765c391e..127e059bf1 100644
--- a/railties/test/generators_test.rb
+++ b/railties/test/generators_test.rb
@@ -152,6 +152,8 @@ class GeneratorsTest < Rails::Generators::TestCase
klass = Rails::Generators.find_by_namespace(:plugin, :remarkable)
assert klass
assert_equal "test_unit:plugin", klass.namespace
+ ensure
+ Rails::Generators.fallbacks.delete(:remarkable)
end
def test_fallbacks_for_generators_on_find_by_namespace_with_context
@@ -159,18 +161,26 @@ class GeneratorsTest < Rails::Generators::TestCase
klass = Rails::Generators.find_by_namespace(:remarkable, :rails, :plugin)
assert klass
assert_equal "test_unit:plugin", klass.namespace
+ ensure
+ Rails::Generators.fallbacks.delete(:remarkable)
end
def test_fallbacks_for_generators_on_invoke
Rails::Generators.fallbacks[:shoulda] = :test_unit
TestUnit::Generators::ModelGenerator.expects(:start).with(["Account"], {})
Rails::Generators.invoke "shoulda:model", ["Account"]
+ ensure
+ Rails::Generators.fallbacks.delete(:shoulda)
end
def test_nested_fallbacks_for_generators
+ Rails::Generators.fallbacks[:shoulda] = :test_unit
Rails::Generators.fallbacks[:super_shoulda] = :shoulda
TestUnit::Generators::ModelGenerator.expects(:start).with(["Account"], {})
Rails::Generators.invoke "super_shoulda:model", ["Account"]
+ ensure
+ Rails::Generators.fallbacks.delete(:shoulda)
+ Rails::Generators.fallbacks.delete(:super_shoulda)
end
def test_developer_options_are_overwritten_by_user_options