Run specs using a newer faker

This is a prerequisite for being able to run specs against Rails 6.1,
since previous faker versions were holding down the i18n dependency with
a requirement incompatible with newest Rails.
This commit is contained in:
David Rodríguez 2020-11-19 11:12:41 +01:00
parent 2dd89a2c12
commit 6e53e799ee
No known key found for this signature in database
GPG Key ID: 1008A258BB37309C
2 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ rails_version = case rails
rails
end
gem 'faker', '~> 0.9.5'
gem 'faker', '~> 1.0'
gem 'sqlite3', ::Gem::Version.new(rails_version) >= ::Gem::Version.new('6-0-stable') ? '~> 1.4.1' : '~> 1.3.3'
gem 'pg', '~> 1.0'
gem 'pry', '~> 0.12.2'

View File

@ -265,10 +265,12 @@ module Ransack
# end
it 'creates ransack attributes' do
person = Person.create!(name: 'Aric Smith')
s = Person.ransack(reversed_name_eq: 'htimS cirA')
expect(s.result.size).to eq(1)
expect(s.result.first).to eq Person.where(name: 'Aric Smith').first
expect(s.result.first).to eq person
end
it 'can be accessed through associations' do