Permalink
Browse files

Avoid running bundler on tests that don't need it

  • Loading branch information...
1 parent 979adea commit cfb37a899d915fbfc63b36e7b1627c5c63cfa622 @rubys rubys committed Apr 3, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 railties/lib/rails/generators/testing/behaviour.rb
@@ -61,7 +61,10 @@ def destination(path)
# 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.

0 comments on commit cfb37a8

Please sign in to comment.