aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/namespaced_generators_test.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-09-24 21:54:16 +0200
committerJosé Valim <jose.valim@gmail.com>2010-09-25 10:46:22 +0200
commit00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae (patch)
tree697afb805c5ca1e0186b09357ad49071a717944b /railties/test/generators/namespaced_generators_test.rb
parentfb08e334d61b1706db754733b209075b0154b57e (diff)
downloadrails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.tar.gz
rails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.tar.bz2
rails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.zip
Generators fix: properly check if module should be created when creating a namespaced model
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/test/generators/namespaced_generators_test.rb')
-rw-r--r--railties/test/generators/namespaced_generators_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb
index 2be5bea117..a4e93a4ecc 100644
--- a/railties/test/generators/namespaced_generators_test.rb
+++ b/railties/test/generators/namespaced_generators_test.rb
@@ -73,6 +73,11 @@ class NamespacedModelGeneratorTest < NamespacedGeneratorTestCase
arguments %w(Account name:string age:integer)
tests Rails::Generators::ModelGenerator
+ def test_module_file_is_not_created
+ run_generator
+ assert_no_file "app/models/test_app.rb"
+ end
+
def test_adds_namespace_to_model
run_generator
assert_file "app/models/test_app/account.rb", /module TestApp/, / class Account < ActiveRecord::Base/