Skip to content

Commit

Permalink
Upgrade Mongoid specs to RSpec 3 expect syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Jul 26, 2015
1 parent 87115c2 commit d296caa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion spec/mongoid/adapters/mongoid/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/mongoid/nodes/condition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d296caa

Please sign in to comment.