Sha256: d7ef79c4366e98d96faf137b7c8a06f70616c081ab0e4d48ce761de0f4a7afa4

Contents?: true

Size: 435 Bytes

Versions: 45

Compression:

Stored size: 435 Bytes

Contents

require 'spec_helper'

describe "A document loaded from rails" do
  before(:all) do
    require 'mongoid/railties/document'
  end

  after(:all) do
    Mongoid::Document.class_eval do
      undef _destroy
    end
  end

  it "defines a _destroy method" do
    expect(Person.new).to respond_to(:_destroy)
  end

  describe "#_destroy" do

    it "always returns false" do
      expect(Person.new._destroy).to be false
    end
  end
end

Version data entries

45 entries across 40 versions & 3 rubygems

Version Path
mongoid-5.4.1 spec/mongoid/railties/document_spec.rb
mongoid-5.4.0 spec/mongoid/railties/document_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/mongoid-6.1.0/spec/mongoid/railties/document_spec.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.2.0/spec/mongoid/railties/document_spec.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.1.0/spec/mongoid/railties/document_spec.rb
mongoid-6.2.0 spec/mongoid/railties/document_spec.rb
mongoid-6.1.1 spec/mongoid/railties/document_spec.rb
mongoid-5.2.1 spec/mongoid/railties/document_spec.rb
tdiary-5.0.4 vendor/bundle/gems/mongoid-6.1.0/spec/mongoid/railties/document_spec.rb
mongoid-6.1.0 spec/mongoid/railties/document_spec.rb
mongoid-5.2.0 spec/mongoid/railties/document_spec.rb
mongoid-5.2.0.rc0 spec/mongoid/railties/document_spec.rb
mongoid-6.1.0.rc0 spec/mongoid/railties/document_spec.rb
mongoid-6.0.3 spec/mongoid/railties/document_spec.rb
mongoid-5.1.6 spec/mongoid/railties/document_spec.rb
mongoid-6.0.2 spec/mongoid/railties/document_spec.rb
mongoid-6.0.1 spec/mongoid/railties/document_spec.rb
mongoid-5.1.5 spec/mongoid/railties/document_spec.rb
mongoid-6.0.0 spec/mongoid/railties/document_spec.rb
mongoid-5.1.4 spec/mongoid/railties/document_spec.rb