Sha256: d836a1a7702c16bc6f7619d4ba450c66837f9a0649cac9b08cab972c52cc5d38

Contents?: true

Size: 794 Bytes

Versions: 6

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

module Bullet
  module Detector
    describe Association do
      before :all do
        @post1 = Post.first
        @post2 = Post.last
      end

      context '.add_object_association' do
        it 'should add object, associations pair' do
          Association.add_object_associations(@post1, :associations)
          expect(Association.send(:object_associations)).to be_include(@post1.bullet_key, :associations)
        end
      end

      context '.add_call_object_associations' do
        it 'should add call object, associations pair' do
          Association.add_call_object_associations(@post1, :associations)
          expect(Association.send(:call_object_associations)).to be_include(@post1.bullet_key, :associations)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bullet-5.7.4 spec/bullet/detector/association_spec.rb
bullet-5.7.3 spec/bullet/detector/association_spec.rb
bullet-5.7.2 spec/bullet/detector/association_spec.rb
bullet-5.7.1 spec/bullet/detector/association_spec.rb
bullet-5.7.0 spec/bullet/detector/association_spec.rb
bullet-5.6.1 spec/bullet/detector/association_spec.rb