[from now] 2014/11/17 19:20:17

diff --git a/Gemfile b/Gemfile
index 613a463..5caa4ea 100644
--- a/Gemfile
+++ b/Gemfile
@@ -40,6 +40,7 @@ group :development, :test do
   gem 'annotate'
   gem 'better_errors'
   gem 'binding_of_caller'
+  gem 'database_rewinder'
   gem 'hirb'
   gem 'hirb-unicode'
   gem 'pry'
diff --git a/Gemfile.lock b/Gemfile.lock
index 1fa8c98..aa72a28 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -42,7 +42,7 @@ GEM
       activerecord (>= 2.3.0)
       rake (>= 0.8.7)
     arel (5.0.1.20140414130214)
-    autoprefixer-rails (4.0.0)
+    autoprefixer-rails (4.0.0.1)
       execjs
     awesome_print (1.2.0)
     bcrypt (3.1.9)
@@ -71,13 +71,14 @@ GEM
     coffee-script-source (1.8.0)
     colorize (0.7.3)
     columnize (0.8.9)
-    compass (0.12.7)
+    compass (0.12.2)
       chunky_png (~> 1.2)
       fssm (>= 0.2.7)
-      sass (~> 3.2.19)
+      sass (~> 3.1)
     compass-rails (1.1.7)
       compass (>= 0.12.2)
       sprockets (<= 2.11.0)
+    database_rewinder (0.4.1)
     debug_inspector (0.0.2)
     debugger-linecache (1.2.0)
     devise (3.4.1)
@@ -100,7 +101,7 @@ GEM
       compass-rails (~> 1)
       jquery-rails
       sass-rails (>= 3.2.3)
-    guard (2.6.1)
+    guard (2.8.2)
       formatador (>= 0.2.4)
       listen (~> 2.7)
       lumberjack (~> 1.0)
@@ -116,7 +117,7 @@ GEM
       unicode-display_width (~> 0.1.1)
     hitimes (1.2.2)
     i18n (0.6.11)
-    jbuilder (2.2.3)
+    jbuilder (2.2.5)
       activesupport (>= 3.0.0, < 5)
       multi_json (~> 1.2)
     jquery-rails (3.1.2)
@@ -125,16 +126,16 @@ GEM
     json (1.8.1)
     kgio (2.9.2)
     libv8 (3.16.14.7)
-    listen (2.7.11)
+    listen (2.8.0)
       celluloid (>= 0.15.2)
       rb-fsevent (>= 0.9.3)
       rb-inotify (>= 0.9)
     lumberjack (1.0.9)
-    mail (2.6.1)
+    mail (2.6.3)
       mime-types (>= 1.16, < 3)
     method_source (0.8.2)
     mime-types (2.4.3)
-    minitest (5.4.2)
+    minitest (5.4.3)
     multi_json (1.10.1)
     orm_adapter (0.5.0)
     pg (0.17.1)
@@ -211,7 +212,7 @@ GEM
       rspec-support (~> 3.1.0)
     rspec-support (3.1.2)
     ruby-graphviz (1.0.9)
-    sass (3.2.19)
+    sass (3.2.0)
     sass-rails (4.0.3)
       railties (>= 4.0.0, < 5.0)
       sass (~> 3.2.0)
@@ -230,7 +231,7 @@ GEM
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (>= 2.8, < 4.0)
-    sqlite3 (1.3.9)
+    sqlite3 (1.3.10)
     therubyracer (0.12.1)
       libv8 (~> 3.16.14.0)
       ref
@@ -240,7 +241,7 @@ GEM
     tilt (1.4.1)
     timers (4.0.1)
       hitimes
-    turbolinks (2.4.0)
+    turbolinks (2.5.2)
       coffee-rails
     tzinfo (1.2.2)
       thread_safe (~> 0.1)
@@ -254,7 +255,7 @@ GEM
       raindrops (~> 0.7)
     warden (1.2.3)
       rack (>= 1.0)
-    yard (0.8.7.4)
+    yard (0.8.7.6)

 PLATFORMS
   ruby
@@ -267,6 +268,7 @@ DEPENDENCIES
   binding_of_caller
   coffee-rails (~> 4.0.0)
   compass-rails
+  database_rewinder
   devise
   groundworkcss
   guard-rspec
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0825163..a576ece 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,6 @@
+require 'devise'
+require 'database_rewinder'
+
 # This file was generated by the `rails generate rspec:install` command. Conventionally, all
 # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
 # The generated `.rspec` file contains `--require spec_helper` which will cause this
@@ -38,6 +41,14 @@ RSpec.configure do |config|
     mocks.verify_partial_doubles = true
   end

+  config.before :suite do
+    DatabaseRewinder.clean_all
+  end
+
+  config.after :each do
+    DatabaseRewinder.clean
+  end
+
 # The settings below are suggested to provide a good initial experience
 # with RSpec, but feel free to customize to your heart's content.
 =begin