Sha256: 489c08630e522aa67d475775af32937c2463805798a42c43aa2636486b8488e7
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
require 'test_helper' class TestRailsCompatibility < Test::Unit::TestCase def setup @document = Class.new do include MongoMapper::Document end end should "have to_param that returns id" do instance = @document.create('_id' => '1234') instance.to_param.should == '1234' end should "alias new to new_record?" do instance = @document.new instance.new_record?.should == instance.new? end should "have column names" do @document.key :fname, String @document.column_names.sort.should == ['_id', 'created_at', 'fname', 'updated_at'] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jnunemaker-mongomapper-0.1.0 | test/test_rails_compatibility.rb |
jnunemaker-mongomapper-0.1.1 | test/test_rails_compatibility.rb |
jnunemaker-mongomapper-0.1.2 | test/test_rails_compatibility.rb |