[rspec-users] rspec 2 not cleaning up after examples run?

David Chelimsky dchelimsky at gmail.com
Thu Jul 1 08:15:45 EDT 2010


On Jul 1, 2010, at 3:22 AM, Timo Rößner wrote:

> On Jun 30, 7:44 pm, Amiruddin Nagri <amir.na... at gmail.com> wrote:
>> I am not sure if this will help or not but I was also getting data not
>> cleared properly when run specs through rake but when ran using script/spec
>> it was cleaning up the data
>> 
>> Amir
>> 
>> On Jun 30, 2010 10:56 PM, "David Chelimsky" <dchelim... at gmail.com> wrote:
>> 
>> On Jun 30, 2010, at 11:55 AM, Timo Rößner wrote:
>> 
>>> On Jun 29, 12:14 pm, David Chelimsky <dchelim.....
>> 
>> The command is rspec in rspec 2. Try:
>> 
>> bundle exec rspec spec/models/challenge_spec.rb
> @David,
> 
> alright, I tried:
> 
>  bundle exec rspec spec/models/challenge_spec.rb
> 
> -> Same results, same log output as above.
> 
> @Amiruddin
> 
> script/spec would be rails 2 / rspec 1 - my problem occurs with rails
> 3 / rspec 2 (and script/spec doesn't exist because of that).

Hard to break the top posting habit :) I moved your comments to the bottom.

@Timo - I'm sorry I missed this the first time through, but it's because the spec_helper config is missing this line:

  config.use_transactional_fixtures = true

The post-install hook when you install rspec-rails instructs you to re-run 'script/rails generate rspec:install', and if you do so you'll see this line in the generated spec_helper.

Let me know if that solves it. I'm pretty sure it will.

Cheers,
David


More information about the rspec-users mailing list