Sha256: 6b39ac4780daf272abf18fd94f479e6cb322debe414ad16e9f67513ed5b88b20

Contents?: true

Size: 419 Bytes

Versions: 14

Compression:

Stored size: 419 Bytes

Contents

require 'spec_helper'

describe Object do
  context "bullet_ar_key" do
    it "should return class and id composition" do
      post = Post.first
      post.bullet_ar_key.should == "Post:#{post.id}"
    end

    if mongoid?
      it "should return class with namesapce and id composition" do
        post = Mongoid::Post.first
        post.bullet_ar_key.should == "Mongoid::Post:#{post.id}"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bullet-4.7.1 spec/bullet/ext/object_spec.rb
bullet-4.7.0 spec/bullet/ext/object_spec.rb
bullet-4.6.0 spec/bullet/ext/object_spec.rb
bullet-4.5.0 spec/bullet/ext/object_spec.rb
bullet-4.4.0 spec/bullet/ext/object_spec.rb
bullet-4.3.1 spec/bullet/ext/object_spec.rb
bullet-4.3.0 spec/bullet/ext/object_spec.rb
bullet-4.2.0 spec/bullet/ext/object_spec.rb
bullet-4.1.6 spec/bullet/ext/object_spec.rb
bullet-4.1.5 spec/bullet/ext/object_spec.rb
bullet-4.1.4 spec/bullet/ext/object_spec.rb
bullet-4.1.3 spec/bullet/ext/object_spec.rb
bullet-4.1.2 spec/bullet/ext/object_spec.rb
bullet-4.1.1 spec/bullet/ext/object_spec.rb