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:
parent
2dd89a2c12
commit
6e53e799ee
2
Gemfile
2
Gemfile
|
@ -14,7 +14,7 @@ rails_version = case rails
|
||||||
rails
|
rails
|
||||||
end
|
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 'sqlite3', ::Gem::Version.new(rails_version) >= ::Gem::Version.new('6-0-stable') ? '~> 1.4.1' : '~> 1.3.3'
|
||||||
gem 'pg', '~> 1.0'
|
gem 'pg', '~> 1.0'
|
||||||
gem 'pry', '~> 0.12.2'
|
gem 'pry', '~> 0.12.2'
|
||||||
|
|
|
@ -265,10 +265,12 @@ module Ransack
|
||||||
# end
|
# end
|
||||||
|
|
||||||
it 'creates ransack attributes' do
|
it 'creates ransack attributes' do
|
||||||
|
person = Person.create!(name: 'Aric Smith')
|
||||||
|
|
||||||
s = Person.ransack(reversed_name_eq: 'htimS cirA')
|
s = Person.ransack(reversed_name_eq: 'htimS cirA')
|
||||||
expect(s.result.size).to eq(1)
|
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
|
end
|
||||||
|
|
||||||
it 'can be accessed through associations' do
|
it 'can be accessed through associations' do
|
||||||
|
|
Loading…
Reference in New Issue