[rspec-users] Slow Focus tags
dchelimsky at gmail.com
Thu Jun 7 11:15:04 UTC 2012
On Thu, Jun 7, 2012 at 5:54 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Thu, Jun 7, 2012 at 4:00 AM, Rainer Kuhn <rainer at incutio.com> wrote:
>> I narrowed it down to three things, the first one might be interesting to
>> you, the other ones are my problem, although probably common among lots of
>> Since we don't mock we usually need a bit of test data prepared for each
>> test. At first we used factories, but setting things up every time took way
>> to long. So I went for fixture builder instead.
>> It was an immediate improvement, although not a great one, since we have a
>> generic setup_test_data method that runs before most tests and loads from
>> the database into instance variables.
>> 1) config.global_fixtures = :all
>> With this line in, the execution of a single focused spec jumps up to a
>> minute. My unresearched guess is that it might load the fixtures for each
>> spec, although it won't even be executed.
> Would you please check log/test.log to verify this?
Actually I went ahead and checked this myself and what I see is that
it only creates fixtures before each spec that is run. If you run one,
it happens once ... 2, twice, etc.
More information about the rspec-users