Closed adkron closed 14 years ago
I don't see much of a slowdown myself, but we are using transactional fixtures. Anyway, it's always going to be slightly slower due to the extra work that slim_scrooge is doing to make a note of the queries as they go by - not much benefit is gained as most tests are executed once.
Rather than supplying an option for you, what about just doing
config.gem 'slim_scrooge' unless Rails.env.test?
in your environment.rb ?
I have a rather large project and multiple testing environments. It isn't bad to have to say unless blah && blah && blah, but I think it would be cleaner to have a configuration setting instead. Just my thought.
Also I have a rather large project and slim_scrooge added almost 2 minutes to the test run. With little to no benefit since most actions are hit only once or twice.
I accept your point - we could add some kind of config setting like: SlimScrooge.disable_in_test_env = true But for now I think for now I'll opt for simplicity - you can use my suggested method - but by all means fork and send me a patch.
There should be a config option to turn slim_scrooge off while in test mode. My integration tests took more that a minute longer with scrooge in place.