aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorWojciech Mach <wojtek@wojtekmach.pl>2011-09-04 10:14:53 +0200
committerWojciech Mach <wojtek@wojtekmach.pl>2011-09-04 10:32:48 +0200
commit47bc5d0cc8dec79c0c64ade7d453b60f846424a9 (patch)
tree4bd0b6f94f25f40094f31b9ee64719867e820401 /railties/test/generators
parent9da07d1b0166950dbdc7cc6e62751f7cabacb38b (diff)
downloadrails-47bc5d0cc8dec79c0c64ade7d453b60f846424a9.tar.gz
rails-47bc5d0cc8dec79c0c64ade7d453b60f846424a9.tar.bz2
rails-47bc5d0cc8dec79c0c64ade7d453b60f846424a9.zip
Add gem_group support to generators
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/actions_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb
index 56cb53c1ad..94e9abb3cc 100644
--- a/railties/test/generators/actions_test.rb
+++ b/railties/test/generators/actions_test.rb
@@ -102,6 +102,20 @@ class ActionsTest < Rails::Generators::TestCase
assert_file 'Gemfile', /gem "rspec-rails"$/
end
+ def test_gem_group_should_wrap_gems_in_a_group
+ run_generator
+
+ action :gem_group, :development, :test do
+ gem 'rspec-rails'
+ end
+
+ action :gem_group, :test do
+ gem 'fakeweb'
+ end
+
+ assert_file 'Gemfile', /\ngroup :development, :test do\n gem "rspec-rails"\nend\n\ngroup :test do\n gem "fakeweb"\nend/
+ end
+
def test_environment_should_include_data_in_environment_initializer_block
run_generator
autoload_paths = 'config.autoload_paths += %w["#{Rails.root}/app/extras"]'