I am using rspec-rails-3 and my version of rails is 4.0.2. I have mongodb database. While i am trying to run rspec tests, i am getting error
Failure/Error: ext_wiki = Entity.find_by(name_ref:'dev_extraction for wikipedia')
Optionable::Unknown:
:consistency is an unknown option. Valid options are: :write, :read, :database, :max_retries, :pool_size, :retry_interval, :refresh_interval, :down_interval, :ssl, :timeout, :instrumenter, :auto_discover.
I have a Entity named model. Code in entity_spec.rb is as follows -:
require 'rails_helper'
RSpec.describe Entity, :type => :model do
it "checks old and new code" do
ext_wiki = Entity.find_by(name_ref:'dev_extraction for wikipedia')
ext_wiki1 = Entity.find_by(name_ref:'dev_extraction for wikipedia')
expect(ext_wiki1['code']).to eq(ext_wiki['code'])
end
it "gives pass" do
expect(1).to eq(1)
end
end