diff --git a/.rspec b/.rspec index fe31725..53607ea 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1 @@ --colour --rturnip diff --git a/Gemfile b/Gemfile index d09b8da..79e61f5 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ group :assets do end group :development, :test do - gem 'rspec-rails', '~> 2.8.1' + gem 'rspec-rails', '~> 2.14.0' gem 'factory_girl_rails', '~> 1.2' gem 'pry', '~> 0.9.8' gem 'faker' @@ -39,7 +39,6 @@ end group :test do gem 'shoulda-matchers', '~> 1.0.0' gem 'capybara', '~> 1.1.2' - gem 'turnip', '~> 0.3.0' gem 'database_cleaner' gem 'launchy' gem 'spork' diff --git a/Gemfile.lock b/Gemfile.lock index 997ddc6..de17de5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,13 +36,13 @@ GEM activesupport (3.2.13) i18n (= 0.6.1) multi_json (~> 1.0) - addressable (2.3.3) - arel (3.0.2) - bcrypt-ruby (3.0.1) - bootstrap-will_paginate (0.0.9) + addressable (2.3.5) + arel (3.0.3) + bcrypt-ruby (3.1.2) + bootstrap-will_paginate (0.0.10) will_paginate builder (3.0.4) - cancan (1.6.9) + cancan (1.6.10) capybara (1.1.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -50,28 +50,29 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 0.1.4) + celluloid (0.15.2) + timers (~> 1.1.0) childprocess (0.3.9) ffi (~> 1.0, >= 1.0.11) - coderay (1.0.9) + coderay (1.1.0) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.6.2) - commonjs (0.2.6) - database_cleaner (0.9.1) + coffee-script-source (1.6.3) + commonjs (0.2.7) + database_cleaner (1.2.0) decent_exposure (1.0.2) - devise (2.0.5) + devise (2.0.6) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) railties (~> 3.1) warden (~> 1.1.1) diff-lcs (1.1.3) erubis (2.7.0) - execjs (1.4.0) - multi_json (~> 1.0) + execjs (2.0.2) factory_girl (2.6.4) activesupport (>= 2.3.9) factory_girl_rails (1.7.0) @@ -79,19 +80,17 @@ GEM railties (>= 3.0.0) faker (1.2.0) i18n (~> 0.5) - ffi (1.6.0) + ffi (1.9.3) formatador (0.2.4) - gherkin (2.11.6) - json (>= 1.7.6) - guard (1.7.0) + guard (2.2.5) formatador (>= 0.2.4) - listen (>= 0.6.0) - lumberjack (>= 1.0.2) - pry (>= 0.9.10) - thor (>= 0.14.6) + listen (~> 2.1) + lumberjack (~> 1.0) + pry (>= 0.9.12) + thor (>= 0.18.1) guard-rspec (1.2.1) guard (>= 1.1) - guard-spork (1.5.0) + guard-spork (1.5.1) childprocess (>= 0.2.3) guard (>= 1.1) spork (>= 0.8.4) @@ -101,14 +100,14 @@ GEM activesupport (>= 3.1, < 4.1) haml (~> 3.1) railties (>= 3.1, < 4.1) - hike (1.2.1) + hike (1.2.3) i18n (0.6.1) journey (1.0.4) - jquery-rails (2.2.1) + jquery-rails (2.3.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - json (1.7.7) - launchy (2.2.0) + json (1.8.1) + launchy (2.4.2) addressable (~> 2.3) less (2.2.2) commonjs (~> 0.2.6) @@ -116,15 +115,18 @@ GEM actionpack (>= 3.1) less (~> 2.2.0) libv8 (3.3.10.4) - listen (0.7.3) - lumberjack (1.0.3) - mail (2.5.3) - i18n (>= 0.4.0) + listen (2.4.0) + celluloid (>= 0.15.2) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + lumberjack (1.0.4) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - method_source (0.8.1) - mime-types (1.22) - multi_json (1.8.2) + method_source (0.8.2) + mime-types (1.25.1) + mini_portile (0.5.2) + multi_json (1.8.4) netzke-basepack (0.8.4) netzke-core (~> 0.8.2) netzke-cancan (0.8.2) @@ -133,12 +135,13 @@ GEM netzke-core (0.8.4) execjs uglifier - nokogiri (1.5.9) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) orm_adapter (0.0.7) - pg (0.15.1) + pg (0.17.1) polyglot (0.3.3) - pry (0.9.12) - coderay (~> 1.0.5) + pry (0.9.12.4) + coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) rack (1.4.5) @@ -163,31 +166,32 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.0.4) - rb-fsevent (0.9.3) + rake (10.1.1) + rb-fsevent (0.9.4) + rb-inotify (0.9.3) + ffi (>= 0.5.0) rdoc (3.12.2) json (~> 1.4) - rspec (2.8.0) - rspec-core (~> 2.8.0) - rspec-expectations (~> 2.8.0) - rspec-mocks (~> 2.8.0) - rspec-core (2.8.0) - rspec-expectations (2.8.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.8.0) - rspec-rails (2.8.1) + rspec-core (2.14.7) + rspec-expectations (2.14.4) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.4) + rspec-rails (2.14.1) actionpack (>= 3.0) + activemodel (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec (~> 2.8.0) - rubyzip (0.9.9) - selenium-webdriver (2.31.0) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rubyzip (1.1.0) + selenium-webdriver (2.39.0) childprocess (>= 0.2.5) multi_json (~> 1.0) - rubyzip + rubyzip (~> 1.0) websocket (~> 1.0.4) shoulda-matchers (1.0.0) - slop (3.4.4) + slop (3.4.7) spork (0.9.2) sprockets (2.2.2) hike (~> 1.2) @@ -197,26 +201,24 @@ GEM therubyracer (0.10.2) libv8 (~> 3.3.10) thor (0.18.1) - tilt (1.3.6) - treetop (1.4.12) + tilt (1.4.1) + timers (1.1.0) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - turnip (0.3.1) - gherkin (>= 2.5) - rspec (~> 2.0) twitter-bootstrap-rails (2.0.9) actionpack (>= 3.1) less-rails (~> 2.2.2) railties (>= 3.1) therubyracer (~> 0.10.1) tzinfo (0.3.38) - uglifier (2.1.2) + uglifier (2.4.0) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) + json (>= 1.8.0) warden (1.1.1) rack (>= 1.0) websocket (1.0.7) - will_paginate (3.0.4) + will_paginate (3.0.5) xpath (0.1.4) nokogiri (~> 1.3) @@ -246,10 +248,9 @@ DEPENDENCIES pry (~> 0.9.8) rails (= 3.2.13) rb-fsevent - rspec-rails (~> 2.8.1) + rspec-rails (~> 2.14.0) shoulda-matchers (~> 1.0.0) spork - turnip (~> 0.3.0) twitter-bootstrap-rails (~> 2.0.3) uglifier (>= 1.0.3) will_paginate (~> 3.0.3) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 9ad09e1..814c010 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -222,11 +222,12 @@ Devise.setup do |config| # end end -#Check in the user if they sign in. (Devise uses Warden) -Warden::Manager.after_set_user do |user,auth,opts| - # this essentially gets called after every netzke request, but alas, - # only using the after_authenticaion callback doesn't get fired after - # user creation. - user.checkin unless user.checked_in? +unless Rails.env.test? + #Check in the user if they sign in. (Devise uses Warden) + Warden::Manager.after_set_user do |user,auth,opts| + # this essentially gets called after every netzke request, but alas, + # only using the after_authenticaion callback doesn't get fired after + # user creation. + user.checkin unless user.checked_in? + end end - diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b434b1b..cb37a6d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,7 +19,6 @@ Spork.prefork do require 'rspec/rails' require 'rspec/autorun' require 'capybara/rspec' - require 'turnip/capybara' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. @@ -66,12 +65,12 @@ Spork.prefork do config.infer_base_class_for_anonymous_controllers = false config.include FactoryGirlStepHelpers config.include FactoryGirl::Syntax::Methods + config.include Devise::TestHelpers, type: :controller #allows :focus tag to only run specific tests config.treat_symbols_as_metadata_keys_with_true_values = true config.filter_run :focus => true config.run_all_when_everything_filtered = true - end end