Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Clean-up within specs
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dnagir  
View profile  
 More options Dec 9 2011, 3:54 am
From: dnagir <dna...@gmail.com>
Date: Fri, 9 Dec 2011 00:54:35 -0800 (PST)
Local: Fri, Dec 9 2011 3:54 am
Subject: Clean-up within specs
Hi,

I wonder how can I clear the database before each spec?

At first I thought that I can wrap each spec within a transaction like
so:
https://github.com/andreasronge/neo4j/blob/master/spec/spec_helper.rb...

but roll it back.

But the problem is that the saved models within that transactions are
not traversable.

So that this is false:

User.create
User.count.should > 0

This is pretty unexpected to me.

So my question is how to clean-up the database before each test.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.