From 53ebc8d88f0025f22d73294bb00cf6aaaf73046c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trung=20L=C3=AA?= Date: Sun, 29 Apr 2012 13:23:27 +1000 Subject: [PATCH] Add Minitest example --- README.textile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.textile b/README.textile index 75127fb..2cfe816 100644 --- a/README.textile +++ b/README.textile @@ -80,6 +80,22 @@ strategy the remaining time. To accomplish this you can say: # then make the DatabaseCleaner.start and DatabaseCleaner.clean calls appropriately +h3. Minitest Example + +
+DatabaseCleaner.strategy = :transaction
+
+class MiniTest::Spec
+  before :each do
+    DatabaseCleaner.clean
+  end
+
+  after :each do
+    DatabaseCleaner.clean
+  end
+end
+
+ h3. RSpec Example