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

diff --git a/Gemfile b/Gemfile
index 4c894d4..d1953a1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -33,12 +33,14 @@ gem 'rails_config'
 group :production do
   gem 'rails_12factor'
   gem 'pg'
+  gem 'therubyracer-heroku'
 end

 group :development, :test do
   gem 'annotate'
   gem 'better_errors'
   gem 'binding_of_caller'
+  gem 'database_rewinder'
   gem 'hirb'
   gem 'hirb-unicode'
   gem 'pry'
@@ -60,9 +62,6 @@ group :development do
   gem 'spring'
 end

-#group :test do
-#end
-
 group :doc do
   gem 'yard', require: false
   gem 'sdoc', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 085b195..85de177 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -42,10 +42,10 @@ GEM
       activerecord (>= 2.3.0)
       rake (>= 0.8.7)
     arel (5.0.1.20140414130214)
-    autoprefixer-rails (3.1.0.20140911)
+    autoprefixer-rails (4.0.0.1)
       execjs
     awesome_print (1.2.0)
-    bcrypt (3.1.7)
+    bcrypt (3.1.9)
     better_errors (2.0.0)
       coderay (>= 1.0.0)
       erubis (>= 2.6.6)
@@ -60,7 +60,7 @@ GEM
     celluloid (0.16.0)
       timers (~> 4.0.0)
     choice (0.1.6)
-    chunky_png (1.3.1)
+    chunky_png (1.3.3)
     coderay (1.1.0)
     coffee-rails (4.0.1)
       coffee-script (>= 2.2.0)
@@ -71,16 +71,17 @@ 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.0)
+    devise (3.4.1)
       bcrypt (~> 3.0)
       orm_adapter (~> 0.1)
       railties (>= 3.2.6, < 5)
@@ -89,7 +90,7 @@ GEM
       warden (~> 1.2.3)
     diff-lcs (1.2.5)
     erubis (2.7.0)
-    execjs (2.2.1)
+    execjs (2.2.2)
     ffi (1.9.6)
     formatador (0.2.5)
     fssm (0.2.10)
@@ -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.1.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.3)
-    minitest (5.4.2)
+    mime-types (2.4.3)
+    minitest (5.4.3)
     multi_json (1.10.1)
     orm_adapter (0.5.0)
     pg (0.17.1)
@@ -190,7 +191,7 @@ GEM
     rdoc (4.1.2)
       json (~> 1.4)
     ref (1.0.5)
-    responders (1.1.1)
+    responders (1.1.2)
       railties (>= 3.2, < 4.2)
     rspec (3.1.0)
       rspec-core (~> 3.1.0)
@@ -213,7 +214,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)
@@ -231,20 +232,21 @@ GEM
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.1.4)
+    sprockets-rails (2.2.0)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
-      sprockets (~> 2.8)
-    sqlite3 (1.3.9)
+      sprockets (>= 2.8, < 4.0)
+    sqlite3 (1.3.10)
     therubyracer (0.12.1)
       libv8 (~> 3.16.14.0)
       ref
+    therubyracer-heroku (0.8.1.pre3)
     thor (0.19.1)
     thread_safe (0.3.4)
     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)
@@ -258,7 +260,7 @@ GEM
       raindrops (~> 0.7)
     warden (1.2.3)
       rack (>= 1.0)
-    yard (0.8.7.4)
+    yard (0.8.7.6)

 PLATFORMS
   ruby
@@ -271,6 +273,7 @@ DEPENDENCIES
   binding_of_caller
   coffee-rails (~> 4.0.0)
   compass-rails
+  database_rewinder
   devise
   groundworkcss
   guard-rspec
@@ -297,6 +300,7 @@ DEPENDENCIES
   spring-commands-rspec
   sqlite3
   therubyracer
+  therubyracer-heroku
   turbolinks
   uglifier (>= 1.3.0)
   unicorn
diff --git a/config/application.rb b/config/application.rb
index e100721..becb548 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -15,10 +15,6 @@ Bundler.require(*Rails.groups)

 module Mensagg
   class Application < Rails::Application
-    # Settings in config/environments/* take precedence over those specified here.
-    # Application configuration should go into files in config/initializers
-    # -- all .rb files in that directory are automatically loaded.
-
     config.time_zone = 'Tokyo'
     config.active_record.default_timezone = :local

diff --git a/config/environments/development.rb b/config/environments/development.rb
index b281992..7a06587 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -36,5 +36,8 @@ Rails.application.configure do
   # config.action_view.raise_on_missing_translations = true

   config.action_mailer.default_url_options = { host: 'localhost:3000' }
-  Rack::MiniProfiler.config.position = 'right'
+
+  if defined?(Rack::MiniProfiler)
+    Rack::MiniProfiler.config.position = 'right'
+  end
 end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 275ba49..88a55bb 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
@@ -82,4 +85,5 @@ RSpec.configure do |config|
   # as the one that triggered the failure.
   Kernel.srand config.seed
 =end
+  config.include Devise::TestHelpers, :type => :controller
 end