diff options
author | Jeff Dean <jeff@zilkey.com> | 2008-11-17 00:15:20 -0500 |
---|---|---|
committer | Jeff Dean <jeff@zilkey.com> | 2008-11-17 00:15:20 -0500 |
commit | 236142d23eb083d0a755d29d6365925ae5cc9f03 (patch) | |
tree | f12e47105127b61d02084d48146cdaeaf43b855b /railties/doc/guides/source/creating_plugins/generators.txt | |
parent | eda282f85743961e2910e4e493a2690fa633b94f (diff) | |
download | rails-236142d23eb083d0a755d29d6365925ae5cc9f03.tar.gz rails-236142d23eb083d0a755d29d6365925ae5cc9f03.tar.bz2 rails-236142d23eb083d0a755d29d6365925ae5cc9f03.zip |
Rails plugin: misc error fixes.
Diffstat (limited to 'railties/doc/guides/source/creating_plugins/generators.txt')
-rw-r--r-- | railties/doc/guides/source/creating_plugins/generators.txt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/railties/doc/guides/source/creating_plugins/generators.txt b/railties/doc/guides/source/creating_plugins/generators.txt index eb0fbb5ee9..8ef46561d1 100644 --- a/railties/doc/guides/source/creating_plugins/generators.txt +++ b/railties/doc/guides/source/creating_plugins/generators.txt @@ -32,14 +32,6 @@ require 'rails_generator/scripts/generate' class DefinitionGeneratorTest < Test::Unit::TestCase - def fake_rails_root - File.join(File.dirname(__FILE__), 'rails_root') - end - - def file_list - Dir.glob(File.join(fake_rails_root, "*")) - end - def setup FileUtils.mkdir_p(fake_rails_root) @original_files = file_list @@ -54,6 +46,16 @@ class DefinitionGeneratorTest < Test::Unit::TestCase new_file = (file_list - @original_files).first assert_equal "definition.txt", File.basename(new_file) end + + private + + def fake_rails_root + File.join(File.dirname(__FILE__), 'rails_root') + end + + def file_list + Dir.glob(File.join(fake_rails_root, "*")) + end end ------------------------------------------------------------------ |