From 8df46eac766ecdb1baadeddf3b93eacc6386c086 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 27 Nov 2012 00:07:05 -0200 Subject: Refactor generators tests to include test helpers in the parent class --- railties/test/generators/namespaced_generators_test.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'railties') diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 9e7626647e..db268ed6f2 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -6,13 +6,15 @@ require 'rails/generators/mailer/mailer_generator' require 'rails/generators/rails/scaffold/scaffold_generator' class NamespacedGeneratorTestCase < Rails::Generators::TestCase + include GeneratorsTestHelper + def setup + super Rails::Generators.namespace = TestApp end end class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase - include GeneratorsTestHelper arguments %w(Account foo bar) tests Rails::Generators::ControllerGenerator @@ -81,7 +83,6 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase end class NamespacedModelGeneratorTest < NamespacedGeneratorTestCase - include GeneratorsTestHelper arguments %w(Account name:string age:integer) tests Rails::Generators::ModelGenerator @@ -142,7 +143,6 @@ class NamespacedModelGeneratorTest < NamespacedGeneratorTestCase end class NamespacedObserverGeneratorTest < NamespacedGeneratorTestCase - include GeneratorsTestHelper arguments %w(account) tests Rails::Generators::ObserverGenerator @@ -163,7 +163,6 @@ class NamespacedObserverGeneratorTest < NamespacedGeneratorTestCase end class NamespacedMailerGeneratorTest < NamespacedGeneratorTestCase - include GeneratorsTestHelper arguments %w(notifier foo bar) tests Rails::Generators::MailerGenerator -- cgit v1.2.3