spec/mongoid/contextual/atomic_spec.rb in mongoid-4.0.0 vs spec/mongoid/contextual/atomic_spec.rb in mongoid-4.0.1
- old
+ new
@@ -101,14 +101,12 @@
it "performs the bitwise operation on initialized fields" do
expect(depeche_mode.reload.likes).to eq(12)
end
- if mongodb_version > "2.5"
- it "does not error on non initialized fields" do
- expect(smiths.reload.likes).to eq(0)
- end
+ it "does not error on non initialized fields" do
+ expect(smiths.reload.likes).to eq(0)
end
end
context "when performing a bitwise or" do
@@ -118,14 +116,12 @@
it "performs the bitwise operation on initialized fields" do
expect(depeche_mode.reload.likes).to eq(61)
end
- if mongodb_version > "2.5"
- it "does not error on non initialized fields" do
- expect(smiths.reload.likes).to eq(13)
- end
+ it "does not error on non initialized fields" do
+ expect(smiths.reload.likes).to eq(13)
end
end
context "when chaining bitwise operations" do
@@ -135,16 +131,14 @@
it "performs the bitwise operation on initialized fields" do
expect(depeche_mode.reload.likes).to eq(14)
end
- if mongodb_version > "2.5"
- it "does not error on non initialized fields" do
- expect(smiths.reload.likes).to eq(10)
- end
+ it "does not error on non initialized fields" do
+ expect(smiths.reload.likes).to eq(10)
end
end
- end
+ end if mongodb_version > "2.5"
describe "#inc" do
let!(:depeche_mode) do
Band.create(likes: 60)