Add Minitest example
This commit is contained in:
parent
205331686d
commit
53ebc8d88f
|
@ -80,6 +80,22 @@ strategy the remaining time. To accomplish this you can say:
|
||||||
# then make the DatabaseCleaner.start and DatabaseCleaner.clean calls appropriately
|
# then make the DatabaseCleaner.start and DatabaseCleaner.clean calls appropriately
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
h3. Minitest Example
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
DatabaseCleaner.strategy = :transaction
|
||||||
|
|
||||||
|
class MiniTest::Spec
|
||||||
|
before :each do
|
||||||
|
DatabaseCleaner.clean
|
||||||
|
end
|
||||||
|
|
||||||
|
after :each do
|
||||||
|
DatabaseCleaner.clean
|
||||||
|
end
|
||||||
|
end
|
||||||
|
</pre>
|
||||||
|
|
||||||
h3. RSpec Example
|
h3. RSpec Example
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
Loading…
Reference in New Issue