Sha256: 4ac84a2fd2fa996792eb2e68bc6f19d0f5acb212a1b8b034ab92f85ff3ee0452

Contents?: true

Size: 364 Bytes

Versions: 14

Compression:

Stored size: 364 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Query support for MongoDoc" do
  describe "#set_modifier" do
    it "modifies all simple key/values of the hash to a set modifier" do
      key = 'key'
      value = 'value'
      hash = {key => value}
      MongoDoc::Query.set_modifier(hash).should == {'$set' => hash}
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
mongo_doc-0.4.2 spec/query_spec.rb
mongo_doc-0.4.1 spec/query_spec.rb
mongo_doc-0.4.0 spec/query_spec.rb
mongo_doc-0.3.2 spec/query_spec.rb
mongo_doc-0.3.1 spec/query_spec.rb
mongo_doc-0.3.0 spec/query_spec.rb
mongodoc-0.2.4 spec/query_spec.rb
mongodoc-0.2.2 spec/query_spec.rb
mongodoc-0.2.1 spec/query_spec.rb
mongodoc-0.2.0 spec/query_spec.rb
mongodoc-0.1.2 spec/query_spec.rb
mongodoc-0.1.1 spec/query_spec.rb
mongodoc-0.1.0 spec/query_spec.rb
mongodoc-0.0.0 spec/query_spec.rb