From d296caa840e6c05eb760df812477ecbd8e23fa6b Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sun, 26 Jul 2015 20:49:21 +0200 Subject: [PATCH] Upgrade Mongoid specs to RSpec 3 expect syntax --- spec/mongoid/adapters/mongoid/base_spec.rb | 4 +++- spec/mongoid/nodes/condition_spec.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/mongoid/adapters/mongoid/base_spec.rb b/spec/mongoid/adapters/mongoid/base_spec.rb index b3625a8b9..5101e88e8 100644 --- a/spec/mongoid/adapters/mongoid/base_spec.rb +++ b/spec/mongoid/adapters/mongoid/base_spec.rb @@ -20,7 +20,9 @@ module Mongoid context 'with scopes' do before do - Person.stub :ransackable_scopes => [:active, :over_age] + allow(Person).to receive_messages( + ransackable_scopes: [:active, :over_age, :of_age] + ) end it "applies true scopes" do diff --git a/spec/mongoid/nodes/condition_spec.rb b/spec/mongoid/nodes/condition_spec.rb index 7ab8e8459..0043974a9 100644 --- a/spec/mongoid/nodes/condition_spec.rb +++ b/spec/mongoid/nodes/condition_spec.rb @@ -26,7 +26,7 @@ module Nodes Ransack.configure { |config| config.ignore_unknown_conditions = true } end - specify { subject.should be_nil } + specify { expect(subject).to be_nil } end end end