aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/namespaced_generators_test.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-27 00:07:05 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-27 00:07:48 -0200
commit8df46eac766ecdb1baadeddf3b93eacc6386c086 (patch)
tree634446084491b79a7b01cf820ebfca594fc30674 /railties/test/generators/namespaced_generators_test.rb
parentfe4571259daab2738908da83b0c2c4387ba139e5 (diff)
downloadrails-8df46eac766ecdb1baadeddf3b93eacc6386c086.tar.gz
rails-8df46eac766ecdb1baadeddf3b93eacc6386c086.tar.bz2
rails-8df46eac766ecdb1baadeddf3b93eacc6386c086.zip
Refactor generators tests to include test helpers in the parent class
Diffstat (limited to 'railties/test/generators/namespaced_generators_test.rb')
-rw-r--r--railties/test/generators/namespaced_generators_test.rb7
1 files changed, 3 insertions, 4 deletions
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