aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2013-04-03 07:55:42 -0400
committerSam Ruby <rubys@intertwingly.net>2013-04-03 09:27:46 -0400
commitcfb37a899d915fbfc63b36e7b1627c5c63cfa622 (patch)
tree2c26f969ca149fd13b75c03268e0d6036f4ad82c /railties/lib/rails
parent979adea8787ef88f62b8dcc1962ae8ce3481978b (diff)
downloadrails-cfb37a899d915fbfc63b36e7b1627c5c63cfa622.tar.gz
rails-cfb37a899d915fbfc63b36e7b1627c5c63cfa622.tar.bz2
rails-cfb37a899d915fbfc63b36e7b1627c5c63cfa622.zip
Avoid running bundler on tests that don't need it
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/testing/behaviour.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/testing/behaviour.rb b/railties/lib/rails/generators/testing/behaviour.rb
index caad810de8..7576eba6e0 100644
--- a/railties/lib/rails/generators/testing/behaviour.rb
+++ b/railties/lib/rails/generators/testing/behaviour.rb
@@ -61,7 +61,10 @@ module Rails
# You can provide a configuration hash as second argument. This method returns the output
# printed by the generator.
def run_generator(args=self.default_arguments, config={})
- capture(:stdout) { self.generator_class.start(args, config.reverse_merge(destination_root: destination_root)) }
+ capture(:stdout) do
+ args += ['--skip-bundle'] unless args.include? '--dev'
+ self.generator_class.start(args, config.reverse_merge(destination_root: destination_root))
+ end
end
# Instantiate the generator.