class Mongomatic::Expectations::BeReference
Public Class Methods
name()
click to toggle source
# File lib/mongomatic/expectations/be_reference.rb, line 4 def self.name "reference" end
Public Instance Methods
to_be()
click to toggle source
# File lib/mongomatic/expectations/be_reference.rb, line 8 def to_be return true if opts[:allow_nil] && value.nil? add_error_msg unless value.is_a? BSON::ObjectId end