From 00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 24 Sep 2010 21:54:16 +0200 Subject: Generators fix: properly check if module should be created when creating a namespaced model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/generators/namespaced_generators_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/test') 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/ -- cgit v1.2.3