Sha256: b3e93bd8d857397cbb3205b48f4879b02dac499e958750b9e7518e644ba75dc1

Contents?: true

Size: 360 Bytes

Versions: 25

Compression:

Stored size: 360 Bytes

Contents

require 'spec_helper'

describe CouchPotato::Persistence, '#reload' do
  let(:db) { CouchPotato.database }

  it 'returns a new instance from the database' do
    comment = Comment.new title: 'hello'
    db.save! comment

    reloaded = comment.reload
    expect(reloaded.object_id).to_not eql(comment.object_id)
    expect(reloaded).to eql(comment)
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
couch_potato-1.17.0 spec/reload_spec.rb
couch_potato-1.16.0 spec/reload_spec.rb
couch_potato-1.15.0 spec/reload_spec.rb
couch_potato-1.14.0 spec/reload_spec.rb
couch_potato-1.13.0 spec/reload_spec.rb
couch_potato-1.12.1 spec/reload_spec.rb
couch_potato-1.12.0 spec/reload_spec.rb
couch_potato-1.11.0 spec/reload_spec.rb
couch_potato-1.10.1 spec/reload_spec.rb
couch_potato-1.10.0 spec/reload_spec.rb
couch_potato-1.9.0 spec/reload_spec.rb
couch_potato-1.7.1 spec/reload_spec.rb
couch_potato-1.7.0 spec/reload_spec.rb
couch_potato-1.6.5 spec/reload_spec.rb
couch_potato-1.6.4 spec/reload_spec.rb
couch_potato-1.6.3 spec/reload_spec.rb
couch_potato-1.4.0 spec/reload_spec.rb
couch_potato-1.3.0 spec/reload_spec.rb
couch_potato-1.2.0 spec/reload_spec.rb
couch_potato-1.1.4 spec/reload_spec.rb