From cfb37a899d915fbfc63b36e7b1627c5c63cfa622 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Wed, 3 Apr 2013 07:55:42 -0400 Subject: Avoid running bundler on tests that don't need it --- railties/lib/rails/generators/testing/behaviour.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails') 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. -- cgit v1.2.3