Sha256: 110d1b60e897b00c0283e281565c974807cc718717233a8118c58a727b6d03af
Contents?: true
Size: 717 Bytes
Versions: 31
Compression:
Stored size: 717 Bytes
Contents
require 'spec_helper' require_relative '../../../lib/locomotive/steam/adapters/mongodb.rb' describe Locomotive::Steam::MongoDBAdapter do let(:adapter) { described_class.new(nil) } describe '#key' do subject { adapter.key(:title, :in) } it { is_expected.to eq :title.in } end describe '#make_id' do let(:id) { '56fd9f48a2f42217744a85d7' } subject { adapter.make_id(id) } it { is_expected.to eq(BSON::ObjectId.from_string('56fd9f48a2f42217744a85d7')) } context 'passing a BSON::ObjectId' do let(:id) { BSON::ObjectId.from_string('56fd9f48a2f42217744a85d7') } it { is_expected.to eq(BSON::ObjectId.from_string('56fd9f48a2f42217744a85d7')) } end end end
Version data entries
31 entries across 31 versions & 1 rubygems