Sha256: b5923b920a8d209db5f5ff79bd33499d4a93f20d61dd49dc24dd40fe9af6d214
Contents?: true
Size: 689 Bytes
Versions: 27
Compression:
Stored size: 689 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require "spec_helper" describe Mongoid::Extensions::Set do describe "#demongoize" do it "returns the set if Array" do expect(Set.demongoize([ "test" ])).to eq(Set.new([ "test" ])) end end describe ".mongoize" do it "returns an array" do expect(Set.mongoize([ "test" ])).to eq([ "test" ]) end it "returns an array even if the value is a set" do expect(Set.mongoize(Set.new([ "test" ]))).to eq([ "test" ]) end end describe "#mongoize" do let(:set) do Set.new([ "test" ]) end it "returns an array" do expect(set.mongoize).to eq([ "test" ]) end end end
Version data entries
27 entries across 27 versions & 2 rubygems