diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-25 19:57:03 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-25 19:57:03 +0000 |
commit | 4b66180ccad53940b18ca1a4350159b1fcf2695c (patch) | |
tree | e3b52b9b0a900715782e715f3665213bc6b78b28 /railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb | |
parent | 932622294194888cf7f9c5a10c082b75f0b7ab8d (diff) | |
download | rails-4b66180ccad53940b18ca1a4350159b1fcf2695c.tar.gz rails-4b66180ccad53940b18ca1a4350159b1fcf2695c.tar.bz2 rails-4b66180ccad53940b18ca1a4350159b1fcf2695c.zip |
Add an integration test generator
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb b/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb new file mode 100644 index 0000000000..90fa96938b --- /dev/null +++ b/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb @@ -0,0 +1,16 @@ +class IntegrationTestGenerator < Rails::Generator::NamedBase + default_options :skip_migration => false + + def manifest + record do |m| + # Check for class naming collisions. + m.class_collisions class_path, class_name, "#{class_name}Test" + + # integration test directory + m.directory File.join('test/integration', class_path) + + # integration test stub + m.template 'integration_test.rb', File.join('test/integration', class_path, "#{file_name}_test.rb") + end + end +end |