diff options
author | Akira Matsuda <ronnie@dio.jp> | 2014-08-13 20:59:31 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2014-08-13 21:25:11 +0900 |
commit | 655c2c8b50aa113ffbe5a8eaf1296b52d111ee4a (patch) | |
tree | 0c71a156c3e48752431fdf93078333e6e4aa3ae7 /railties/test | |
parent | cbde413df3839e06dd14e3c220e9800af91e83ab (diff) | |
download | rails-655c2c8b50aa113ffbe5a8eaf1296b52d111ee4a.tar.gz rails-655c2c8b50aa113ffbe5a8eaf1296b52d111ee4a.tar.bz2 rails-655c2c8b50aa113ffbe5a8eaf1296b52d111ee4a.zip |
Fix Railties tests that were order dependent
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators_test.rb | 10 |
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 |