Skip to content

Commit f6e0fa8

Browse files
More tests
1 parent cff5478 commit f6e0fa8

File tree

4 files changed

+43
-7
lines changed

4 files changed

+43
-7
lines changed

.evergreen/config/variants.yml.erb

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,40 @@ buildvariants:
171171
tasks:
172172
- name: "test"
173173

174-
- matrix_name: app-tests-rails-7
174+
- matrix_name: app-tests-rails-master
175175
matrix_spec:
176176
ruby: ["ruby-3.1", "ruby-3.2"]
177177
driver: ["current"]
178-
mongodb-version: '6.0'
178+
mongodb-version: '7.0'
179179
topology: standalone
180180
app-tests: yes
181-
rails: ['6.1', '7.0', '7.1', '7.2']
181+
rails: ['master']
182+
os: ubuntu-20.04
183+
display_name: "app tests ${driver}, ${ruby}, ${rails}"
184+
tasks:
185+
- name: "test"
186+
187+
- matrix_name: app-tests-rails-8
188+
matrix_spec:
189+
ruby: ["ruby-3.1", "ruby-3.2"]
190+
driver: ["current"]
191+
mongodb-version: '7.0'
192+
topology: standalone
193+
app-tests: yes
194+
rails: ['8.0']
195+
os: ubuntu-20.04
196+
display_name: "app tests ${driver}, ${ruby}, ${rails}"
197+
tasks:
198+
- name: "test"
199+
200+
- matrix_name: app-tests-rails-7
201+
matrix_spec:
202+
ruby: ["ruby-3.2"]
203+
driver: ["current"]
204+
mongodb-version: '7.0'
205+
topology: standalone
206+
app-tests: yes
207+
rails: ['7.0', '7.1', '7.2']
182208
os: ubuntu-20.04
183209
display_name: "app tests ${driver}, ${ruby}, ${rails}"
184210
tasks:
@@ -191,7 +217,7 @@ buildvariants:
191217
mongodb-version: '5.0'
192218
topology: standalone
193219
app-tests: yes
194-
rails: ['6.0']
220+
rails: ['6.0', '6.1']
195221
os: rhel80
196222
display_name: "app tests ${driver}, ${ruby}, ${rails}"
197223
tasks:

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ if test -f tmp/rspec-all.json; then
123123
mv tmp/rspec-all.json tmp/rspec.json
124124
fi
125125

126-
python3 -m mtools.mlaunch.mlaunch stop --dir "$dbdir"
126+
python3 -m mtools.mlaunch.mlaunch stop --dir "$dbdir" || true
127127

128128
exit ${test_status}

gemfiles/rails-master.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ source 'https://rubygems.org'
44
gem 'actionpack', git: 'https://github.com/rails/rails'
55
gem 'activemodel', git: 'https://github.com/rails/rails'
66

7+
group :test do
8+
gem 'activejob', git: 'https://github.com/rails/rails'
9+
end
10+
711
gemspec path: '..'
812

913
require_relative './standard'

spec/mongoid/railties/bson_object_id_serializer_spec.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
# rubocop:todo all
33

44
require 'spec_helper'
5-
require 'active_job'
6-
require 'mongoid/railties/bson_object_id_serializer'
5+
begin
6+
require 'active_job'
7+
require 'mongoid/railties/bson_object_id_serializer'
8+
rescue LoadError
9+
should_skip = true
10+
end
711

812
describe 'Mongoid::Railties::ActiveJobSerializers::BsonObjectIdSerializer' do
913

14+
skip 'This test requires Rails version' if should_skip
15+
1016
let(:serializer) { Mongoid::Railties::ActiveJobSerializers::BsonObjectIdSerializer.instance }
1117
let(:object_id) { BSON::ObjectId.new }
1218

0 commit comments

Comments
 (0)