File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ def load_defaults(version)
39
39
load_defaults "7.4"
40
40
when "7.4"
41
41
# flags introduced in 7.5 - old functionality
42
+ self . legacy_attributes = true
42
43
self . overwrite_chained_operators = true
43
44
44
45
load_defaults "7.5"
45
46
when "7.5"
46
47
# flags introduced in 8.0 - old functionality
47
- self . legacy_attributes = true
48
48
self . map_big_decimal_to_decimal128 = false
49
49
when "8.0"
50
50
# All flag defaults currently reflect 8.0 behavior.
Original file line number Diff line number Diff line change 40
40
41
41
shared_examples "turns off 7.5 flags" do
42
42
it "turns off the 7.5 flags" do
43
+ expect ( Mongoid . legacy_attributes ) . to be true
43
44
expect ( Mongoid . overwrite_chained_operators ) . to be true
44
45
end
45
46
end
46
47
47
48
shared_examples "turns on 7.5 flags" do
48
49
it "turns on the 7.5 flags" do
50
+ expect ( Mongoid . legacy_attributes ) . to be false
49
51
expect ( Mongoid . overwrite_chained_operators ) . to be false
50
52
end
51
53
end
52
54
53
55
shared_examples "turns off 8.0 flags" do
54
56
it "turns off the 8.0 flags" do
55
- expect ( Mongoid . legacy_attributes ) . to be true
56
57
expect ( Mongoid . map_big_decimal_to_decimal128 ) . to be false
57
58
end
58
59
end
59
60
60
61
shared_examples "turns on 8.0 flags" do
61
62
it "turns on the 8.0 flags" do
62
- expect ( Mongoid . legacy_attributes ) . to be false
63
63
expect ( Mongoid . map_big_decimal_to_decimal128 ) . to be true
64
64
end
65
65
end
You can’t perform that action at this time.
0 commit comments