Sha256: 82734423a39827d887551aa05a8addff98b9b9657292c57d2b4ee6ff80e01818
Contents?: true
Size: 818 Bytes
Versions: 59
Compression:
Stored size: 818 Bytes
Contents
require "spec_helper" describe Mongoid::Extensions::Regexp do describe ".demongoize" do let(:value) do Regexp.demongoize(/[^abc]/) end it "returns the provided value" do expect(value).to eq(/[^abc]/) end end describe ".mongoize" do context "when providing a regex" do let(:value) do Regexp.mongoize(/[^abc]/) end it "returns the provided value" do expect(value).to eq(/[^abc]/) end end context "when providing a string" do let(:value) do Regexp.mongoize("[^abc]") end it "returns the provided value as a regex" do expect(value).to eq(/[^abc]/) end end end describe "#mongoize" do it "returns self" do expect(/[^abc]/.mongoize).to eq(/[^abc]/) end end end
Version data entries
59 entries across 54 versions & 6 rubygems