diff --git a/Gemfile b/Gemfile index db1e06c0..36adc0a2 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ group :test do gem "omniauth-facebook" gem "omniauth-openid", "~> 1.0.1" gem "webrat", "0.7.2", :require => false - gem "mocha", :require => false + gem "mocha", "~> 0.10.0", :require => false platforms :mri_18 do gem "ruby-debug", ">= 0.10.3" diff --git a/lib/devise/models/authenticatable.rb b/lib/devise/models/authenticatable.rb index 8d4765d6..51607714 100644 --- a/lib/devise/models/authenticatable.rb +++ b/lib/devise/models/authenticatable.rb @@ -107,7 +107,7 @@ module Devise # Example: # # def self.find_for_authentication(tainted_conditions) - # find_first_by_auth_conditions(tainted_conditions, active: true) + # find_first_by_auth_conditions(tainted_conditions, :active => true) # end # # Finally, notice that Devise also queries for users in other scenarios diff --git a/test/integration/authenticatable_test.rb b/test/integration/authenticatable_test.rb index b471674f..9f5efcb0 100644 --- a/test/integration/authenticatable_test.rb +++ b/test/integration/authenticatable_test.rb @@ -407,7 +407,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest test 'sign in stub in xml format' do get new_user_session_path(:format => 'xml') - assert_equal "\n\n \n \n\n", response.body + assert_equal "\n\n \n \n\n", response.body end test 'sign in stub in json format' do diff --git a/test/models/authenticatable_test.rb b/test/models/authenticatable_test.rb index 17829b84..b3eb9879 100644 --- a/test/models/authenticatable_test.rb +++ b/test/models/authenticatable_test.rb @@ -2,8 +2,8 @@ require 'test_helper' class AuthenticatableTest < ActiveSupport::TestCase test 'find_first_by_auth_conditions allows custom filtering parameters' do - user = User.create!(email: "example@example.com", password: "123456") - assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }), user - assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }, id: user.id + 1), nil + user = User.create!(:email => "example@example.com", :password => "123456") + assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }), user + assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }, :id => user.id + 1), nil end end