Sha256: 1ef572b32c8591314aba8f50f2db753da1fc97cb0258f6e44d31e5da1682edf0

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 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

    begin
      require '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
    rescue LoadError
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bullet-4.1.0 spec/bullet/ext/object_spec.rb
bullet-4.0.0 spec/bullet/ext/object_spec.rb