Skip to content

Commit 4a4a0f2

Browse files
committed
Stick to bundle < 2
1 parent 1ebdda3 commit 4a4a0f2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ skip_tags: true
44

55
environment:
66
JRUBY_OPTS: "--dev -J-Xmx1024M --debug"
7+
RAILS_VERSION: 5.2
78
matrix:
89
- ruby_version: "Ruby23"
910
- ruby_version: "Ruby23-x64"
@@ -13,6 +14,9 @@ cache:
1314

1415
install:
1516
- SET PATH=C:\%ruby_version%\bin;%PATH%
17+
- gem uninstall bundler -a -x -I
18+
- gem update --system 2.7.9
19+
- # gem install bundler -v '1.17.3'
1620
- bundle env
1721
- bundle check || bundle install --path=vendor/bundle --retry=3 --jobs=3
1822
- bundle clean --force

test/cache_test.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def test_expiring_of_cache_at_update_of_record
164164

165165
assert_equal 'Foo', author_json[:name]
166166

167-
author.update_attributes(name: 'Bar')
167+
author.update(name: 'Bar')
168168
author_json = AuthorSerializerWithCache.new(author).as_json
169169

170170
expected = 'Bar'
@@ -202,10 +202,12 @@ def test_cache_expiration_in_collection_on_update_of_record
202202
end
203203

204204
bar = 'Bar'
205-
author.update!(name: bar)
205+
Timecop.travel(10.seconds.from_now) do
206+
author.update!(name: bar)
206207

207-
collection_json = render_object_with_cache(author_collection, each_serializer: AuthorSerializerWithCache)
208-
assert_equal [{ name: bar }, { name: bar }, { name: foo2 }], collection_json
208+
collection_json = render_object_with_cache(author_collection, each_serializer: AuthorSerializerWithCache)
209+
assert_equal [{ name: bar }, { name: bar }, { name: foo2 }], collection_json
210+
end
209211
ensure
210212
ARModels::Author.cache_versioning = original_cache_versioning unless original_cache_versioning == :none
211213
end

0 commit comments

Comments
 (0)